Cldr version 2.20.0
Enhancements
-
Updates to CLDR version 39 data.
-
Add
Cldr.Locale.parent/1
to return the parent locale according. This is not exactly the same as the CLDR locale inheritance rules -
Add
Cldr.Locale.parents/2
to return a list of parents up to and including theroot
locale. It is a recursive use ofCldr.Locale.parent/1
. -
Add locale display name data to the locale files. This data can be used to format a locale for UI usage.
-
Add subdivision translations to the locale files. This data can be used to format subdivision names for UI usage. Thanks to @mskv. Closes #144.
-
Add grammatical features to the repository. This data is used in ex_cldr_units. See also
Cldr.Config.grammatical_features/0
. -
Add grammatical gender to the repository. This data is used in ex_cldr_units. See also
Cldr.Config.grammatical_gender/0
. -
Make
Cldr.Locale.first_match/2
a public function. This function is useful for other CLDR-based libraries to help resolve the files of localised content in CLDR. -
Add
:add_fallback_locales
to the backend configuration. Whentrue
, the fallback locales of the configured backend locales is also added to the configuration. The default isfalse
and therefore by default there is no change to behaviour from previous releases. Setting this option totrue
enables means that data that is stored in parent locales rather than child locales can be processed. This applies particularly to rules-based number formats and subdivision data. These data aren't stored in all locales - generally they are stored in the base language locale. -
Add
Cldr.Config.fallback_chain/1
which takes a locale name and returns a list of locales from which this locale inherits up to but not including theroot
locale. -
Add
Cldr.Config.fallback/1
which takes a locale name and returns the direct parent of the locale name. -
Rename alias key
subdivisionAlias
tosubdivision
-
Fix
Cldr.Substitution.substitute/2
when the template has no substitutions. Thanks to @jarrodmoldrich. Closes ex_cldr_units #20.