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

Enforce legacy 2-letter language code to lower case #884

Open
herrvigg opened this issue Sep 13, 2020 · 0 comments
Open

Enforce legacy 2-letter language code to lower case #884

herrvigg opened this issue Sep 13, 2020 · 0 comments
Labels
core Core functionalities, including the admin section help wanted Extra attention is needed

Comments

@herrvigg
Copy link
Collaborator

herrvigg commented Sep 13, 2020

With the release 3.9.0 the new language code now supports 2-letter (ISO 639-1) or 3-letter code (ISO-639-2 and ISO-639-3) to fix #836, also discussed in #668.

This new version enforces lower case checks for new entries. The reason is that internally these codes should correspond to the ISO 639 codes specifications (although we don't check against a limited set of values but the format should look the same). It is always better to enforce such norms when they exist because it simplifies the code and can improve the performance.

A common confusion is to mix the language code (ISO 639) with the regional code (ISO 3166) such as GB or US which is upper case. But this is a different part and a future feature. The language ISO 639 part should be lower case.

There was some confusion in the help notes of the language form, mentioning that the URL checks were case sensitive. This is true from a pure formal HTTP aspect, but this is not the case in qTranslate (for the URL check). The URL can be upper case and this should still find the lower case entry, no change here. But this is not recommended for SEO, because of possible redirections in qTranslate (canonical URL) and in general upper case in URL is not a common practice, even less for language codes.

As qTranslate only recommended lower case but allowed upper case values, i cannot enforce this check for now before being sure the users having upper case codes migrate all their content to lower case. The hardest part concerns the post content obviously. I really hope this is a minority of users, in that case please comment here because we need to find a solution. I may maintain the legacy support in qTranslate but for the upcoming official plugin this lower case check will be enforced for sure, the legacy support will be dropped.

@herrvigg herrvigg added the core Core functionalities, including the admin section label Sep 13, 2020
@herrvigg herrvigg added the help wanted Extra attention is needed label Apr 2, 2023
@herrvigg herrvigg added this to To Do in Major topics Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionalities, including the admin section help wanted Extra attention is needed
Projects
Development

No branches or pull requests

1 participant