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: Support more valid locales: language-script and language-script-region #724

Open
hanguokai opened this issue Nov 15, 2024 · 2 comments
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. implemented: safari Implemented in Safari needs-triage: chrome Chrome needs to assess this issue for the first time neutral: firefox Not opposed or supportive from Firefox topic: localization

Comments

@hanguokai
Copy link
Member

hanguokai commented Nov 15, 2024

Locale Format

Locale identifier consists of language subtag, script subtag, region subtag, and one or more variant subtags.

For example,

  • zh-CN and zh-TW are language + region. They mean Chinese in different regions.
  • zh-Hans and zh-Hant are language + script. They mean Simplified Chinese and Traditional Chinese without regions.
  • zh-Hans-CN, zh-Hans-SG, zh-Hant-HK and zh-Hant-TW are language + script + region. They mean Simplified Chinese and Traditional Chinese in different regions.

For historical reasons, zh-CN and zh-TW are often used to represent Simplified Chinese and Traditional Chinese, but this is not rigorous or accurate.

The current level of support

Goal

All browsers support all valid locales, including:

  • language + region
  • language + script
  • language + script + region

Note: The languages supported by the browser and the languages supported by the extension store should be two different things, but there is some correlation.

Other discussions

@github-actions github-actions bot added needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time needs-triage: safari Safari needs to assess this issue for the first time labels Nov 15, 2024
@hanguokai hanguokai added implemented: safari Implemented in Safari topic: localization i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. and removed needs-triage: safari Safari needs to assess this issue for the first time labels Nov 15, 2024
@carlosjeurissen
Copy link
Contributor

Also relevant: #131
Which compiles a list of the current situation in terms of what locale tags are supported by what browser/stores:
https://docs.google.com/spreadsheets/d/1N0f9Nl-PM_nafpJEfYbS8xV9Qvb6o6DvuBFWLTXRr2Y/edit#gid=1518318975

We should also align on properly formatted locale tags:
#642

The webExtension Stores should also receive support for this. Currently the Naver Whale extension store does not support loading extensions with locale tags which include script subtags (like sr-Latn or zh-Hans).

@carlosjeurissen
Copy link
Contributor

@hanguokai in terms of support. What do you expect from browsers? Say the browser uses "zh-CN" as locale. And the extension only has "zh-Hans" and "zh-Hant", should it actively search for a best match and pick "zh-Hans"? Or should it just be able to accept extensions which have locale files using language tags containing a script subtag?

@Rob--W Rob--W added neutral: firefox Not opposed or supportive from Firefox and removed needs-triage: firefox Firefox needs to assess this issue for the first time labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. implemented: safari Implemented in Safari needs-triage: chrome Chrome needs to assess this issue for the first time neutral: firefox Not opposed or supportive from Firefox topic: localization
Projects
None yet
Development

No branches or pull requests

3 participants