Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Language Association Codes #44551

Open
wants to merge 2 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

brianteeman
Copy link
Contributor

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

Testing Instructions

Create a multilingual site.
Enable the languagecode system plugin and give a new lang tag value for a language.

image

Actual result BEFORE applying this Pull Request

image

Expected result AFTER applying this Pull Request

image

Link to documentations

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

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 joomla#37289 created by @infograf768

That PR has merge conflicts and @infograf768 is now retired.

See the original PR for more screenshots but an example is below

Signed-off-by: BrianTeeman <[email protected]>
@fgsw
Copy link

fgsw commented Nov 28, 2024

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.

Signed-off-by: BrianTeeman <[email protected]>
@Fedik
Copy link
Member

Fedik commented Nov 29, 2024

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.

@universewrld
Copy link

@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
Copy link
Contributor Author

@brianteeman will it work if instead of en-GB i just use en? in your screenshots it is shown only for language+country codes.

yes but then then language code wont work as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants