Allow addtional "tokens" in the locale, additional to language and country
See original GitHub issueProblem
As I was trying to organize some translations, I found myself in the situation that I need to use not only language and country to define the locale, but also a variant.
For example (not the real situation but hopefully to illustrate)
de
= Germande-DE
= German / Germanyde-DE-bavarian
= German / Germany / Bavarian
Using your Beta v2.0 WiP I found, that 3rd locale de-DE-bavarian
will not be shown neither in the Progress view nor in the editors popup, where the translations are shown. Only de
and de-DE
will be visible.
Reference to Java locale
For example in the Java documentation 7 and 8 there are mentioned two “non-conforming locales” ja_JP_JP and th_TH_TH.
Additionally the documentation suggests extensions to the locale, see there.
Another link is this in Table 5. Some of the Supported Locales in java.util and java.text Packages
| Language | Country | Locale ID | | … | … | … | | Thai (Western digits) | Thailand | th_TH | | Thai (Thai digits) | Thailand | th_TH_TH |
Suggested solution
Thus I would suggest, that the locale can be created from a - theoretical endless 😉 - number of tokens, with the only constraint, that
- the first token defines the language
- the second token defines the country and is used to retrieve the country flag
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
For a more official use of locale, you can see above
th_TH
= Thai (Western digits) Thailandth_TH_TH
= Thai (Thai digits) ThailandSorry for not being clear enough:
locale()
to localize some vendors text (like item number, #, item#, etc.).