User tests: Successful: Unsuccessful:
In the Language Code plugin it is possible to change the code used for a specified language. eg fr-FR can be changed to fr-CA
However everywhhere in the admin that associations are displayed it uses the original code and not the changed code.
This PR is a "takeover" of the original PR #37289 created by @infograf768
That PR has merge conflicts and @infograf768 is now retired.
See the original PR for more screenshots
Create a multilingual site.
Enable the languagecode system plugin and give a new lang tag value for a language.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_associations com_categories com_contact com_content com_menus com_newsfeeds Modules |
Labels |
Added:
Feature
PR-5.3-dev
|
The feature maybe is good and usefull.
However the implementation is questionable, because hardcoding if (PluginHelper::isEnabled('system', 'languagecode'))
everywhere promisses a loot of fun bugs.
Need to look for a better way of doing the same, maybe some extra event, or kind of that.
@brianteeman will it work if instead of en-GB
i just use en
?
in your screenshots it is shown only for language+country
codes.
@brianteeman will it work if instead of
en-GB
i just useen
? in your screenshots it is shown only forlanguage+country
codes.
yes but then then language code wont work as intended.
Prebuilt packages are not available for a retest.
Labels |
Added:
PBF
|
I have tested this item ✅ successfully on 6cc6c8c
Before | After |
---|---|
![]() |
![]() |
I have tested this item ✅ successfully on 6cc6c8c
Status | Pending | ⇒ | Ready to Commit |
PBF
Status | Ready to Commit | ⇒ | Pending |
I am sorry, but this cannot be merged, because of hardcoding if (PluginHelper::isEnabled('system', 'languagecode'))
.
We need to find a better logic.
I dont understand your reasoning. PluginHelper::isEnabled
is used over 50 times in the core
It not an issue with PluginHelper::isEnabled
, but with hardcoded plugin itself.
In the core, the plugins should never be used like:
$languageCodeParams = new Registry(PluginHelper::getPlugin('system', 'languagecode')->params);
What if I want to use 3rd language plugin? With current approach the whole thing will not going to work.
The plugins should listen to events, instead of being used directly.
For current issue, it could be a new event that hook up in to LanguageHelper::getContentLanguages
and extend it, or kind of that.
As i said this is already being used in core
That another bad code, and not an excuse to do the same.
When infograf wrote the code I assume he just followed existing practice
This pull request has been automatically rebased to 6.0-dev.
Title |
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-04-25 21:04:21 |
Closed_By | ⇒ | brianteeman | |
Labels |
Added:
PR-6.0-dev
Removed: PR-5.3-dev |
not wasting my tuime
I have tested this item ✅ successfully on 8ccef0c
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44551.