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

i18n plugin missing basic language versions for languages where country-specific versions exist #576

Open
campbell-m opened this issue Sep 10, 2023 · 1 comment

Comments

@campbell-m
Copy link

There are a number of languages in the i18n plugin where there are country-specific versions of the language files but no basic versions. For example there are sv-SE.* files but no sv.* files.

This causes problems for applications that choose a language file, eg using PHP's Locale::lookup() method, based on a user-specified locale, either via a config setting or via the browser language preferences. For example, if the locale is set to 'sv' then the 'sv-SE' file will not be found. The RFC 4647 lookup algorithm used by Locale:lookup() allows for falling back from, eg, 'sv-SE' to 'sv' but not the other way round.

There should be a basic language file for all languages where there is a country-specific version. In most cases this will be a simple matter of copying the main country-specific version, eg 'sv-SE' to 'sv, 'de-DE' to 'de', 'nl-NL' to 'nl', etc.

@campbell-m campbell-m changed the title i18n plugin missiung basic language versions for languages where country-specific versions exist i18n plugin missing basic language versions for languages where country-specific versions exist Sep 10, 2023
@AllanJard
Copy link
Contributor

Thank you for filing this. Yes, it would make sense to follow RFC-4647 for our language file names. I'll look to look into that, although I can't say when I'll get time to do so yet.

campbell-m added a commit to meeting-room-booking-system/mrbs-code that referenced this issue Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants