Cldr.Config.fallback

You're seeing just the function fallback, go back to Cldr.Config module for more information.

Returns the immediate fallback locale for a locale name. Follows the CLDR TR35 resource bundle lookup algorithm.

This function is only intended to return the fallback for the locales defined by CLDR. It does not perform any alias lookup or likely subtag processing.

Algorithm Summary

  1. Decompose the locale name into language, script, territory and variant. CLDR locale names have no more than these four parts but usually have less.

  2. Look for a locale in the following order:

    • language-script-territory
    • language-script
    • language-territory
    • language
  3. At each stage in (2) resolve an alias in parent_locales/1