Skip to content

Cldr version 2.20.0

Compare
Choose a tag to compare
@kipcole9 kipcole9 released this 07 Apr 22:26

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 the root locale. It is a recursive use of Cldr.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. When true, the fallback locales of the configured backend locales is also added to the configuration. The default is false and therefore by default there is no change to behaviour from previous releases. Setting this option to true 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 the root locale.

  • Add Cldr.Config.fallback/1 which takes a locale name and returns the direct parent of the locale name.

  • Rename alias key subdivisionAlias to subdivision

  • Fix Cldr.Substitution.substitute/2 when the template has no substitutions. Thanks to @jarrodmoldrich. Closes ex_cldr_units #20.