Use CLDR rules for locale inheritance
See original GitHub issueHi,
I didn’t find in the documentation how to handle the locale inheritance. Here what i’m looking for :
lingui add-locale fr fr-FR fr-BE
lingui extract
- add the translation of ‘msg.id.specific’ into all 3 files
- add the translation of ‘msg.id.generic’ only into ‘fr’ file (because the translation is the same for all ‘fr’ and other ‘fr’ alternative)
lingui compile
- load the catalogs with something like this:
let i18n = setupI18n({
language: guessLocale(),
catalogs: {
fr: frMessages,
'fr-BE': frBEMessages,
'fr-FR': frFRMessages,
},
})
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (9 by maintainers)
Top Results From Across the Web
CLDR 24 Release Note - Unicode CLDR
This inherits from en but removes or generalizes US-specific content (removes US timezone, uses US$ instead of $ as symbol for USD, etc.)....
Read more >Survey Tool Guide - Unicode CLDR
Use Reports at the beginning to review the data in your language in a holistic ... If the parent locale has a good...
Read more >Core Specification - Unicode CLDR
Unicode language and locale identifiers inherit the design and the repertoire of subtags from [BCP47] Language Tags. There are some extensions and restrictions ......
Read more >CLDR 27 Release Note - Unicode CLDR
Improved documentation of locale inheritance and matching, bundle versus item lookup, and parent locale information. · Extensive clarifications to the intended ...
Read more >Unicode Locale Data Markup Language (LDML) Part 2: General
9.1 Segmentation Inheritance; 9.2 Segmentation Suppressions. 10 Transforms. 10.1 Inheritance. 10.1.1 Pivots. 10.2 Variants; 10.3 Transform Rules Syntax.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see! That way you can ship customized locales to each customer. Interesting! Thank you for sharing 👍
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.