Cldr.Config.fallback_chain
You're seeing just the function
fallback_chain
, go back to Cldr.Config module for more information.
Returns the fallback chain for a locale name. Follows the CLDR TR35 resource bundle lookup algorithm.
This function is only intended to return fallback chains for the locales defined by CLDR. It does not perform any alias lookup or likely subtag processing.
The primary purpose for this function is to support including fallback locales in a backend configuration since both RBNF and Subdivision data follows the fallback chain.
Algorithm Summary
Decompose the locale name into language, script, territory and variant. CLDR locale names have no more than these four parts but usually have less.
Look for a locale in the following order:
- language-script-territory
- language-script
- language-territory
- language
At each stage in (2) resolve an alias in
parent_locales/1