Expand description
Locale tags: their canonical form, which one to use, and the chain a lookup falls back along.
Constants§
- ENGLISH
- The source language: the English written in the code and in the
encatalogue, where every chain ends. - PSEUDO
- The pseudo-locale: English, accented and lengthened, to see text that is not translated and layouts that do not absorb longer strings.
Functions§
- autonym
- A language’s own name (
Françaisforfr), for the common ones; the tag itself otherwise. - chain
- The locales a lookup tries, most specific first, ending with English:
zh-Hant-TWgiveszh-Hant-TW,zh-Hant,zh,en. When the language has no catalogue of its own but a regional one isavailable(pt-BRforpt-PT), that one is tried after the language. The pseudo-locale reads English. - choose
- The locale to use:
env(an environment variable’s value), thensetting(the user’s choice), thensystem, then English. A value that names no language is skipped. - language
- The language subtag of a locale (
frforfr-CA). - normalize
- A locale tag in its canonical form (
fr-CA,x-pseudo), from a tag or a POSIX locale name (fr_CA.UTF-8@euro);Nonewhen it names no language.CandPOSIXare English. - system
- The system’s language, if it says.