question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use CLDR rules for locale inheritance

See original GitHub issue

Hi,

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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tricoder42commented, May 30, 2019

I see! That way you can ship customized locales to each customer. Interesting! Thank you for sharing 👍

0reactions
stale[bot]commented, Oct 29, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found