Cldr v0.0.8 Cldr.Consolidate

Consolidates all locale-specific information from the CLDR repository into one locale-specific file.

Summary

Functions

Consolidates known locales as defined by Cldr.known_locales/0

Consolidates one locale

Consolidates all available CLDR locale-specific json files into a set of locale-specific json files, one per locale

Returns the directory where the locale-specific json files are stored

Returns the directory where the consolidated Cldr content is stored

Returns the directory where the downloaded CLDR repository files are stored

Identifies the top level keys in the consolidated locale file

Functions

all_locales()
consolidate_known_locales()
consolidate_known_locales :: :ok

Consolidates known locales as defined by Cldr.known_locales/0.

consolidate_locale(locale)

Consolidates one locale.

consolidate_locales()
consolidate_locales :: :ok

Consolidates all available CLDR locale-specific json files into a set of locale-specific json files, one per locale.

Also formats non-locale-specific CLDR data that is core to Cldr operation.

consolidated_locales_dir()

Returns the directory where the locale-specific json files are stored.

consolidated_output_dir()

Returns the directory where the consolidated Cldr content is stored.

We store the consolidated files in the ./priv/cldr directory which is part of the github repo and therefore available for download.

However only the β€œen” locale is packaged in hex and any other configured locales will be downloaded when the client app is compiled.

download_data_dir()

Returns the directory where the downloaded CLDR repository files are stored.

required_modules()
required_modules :: [String.t]

Identifies the top level keys in the consolidated locale file.

These keys represent difference dimensions of content in the CLDR repository and serve three purposes:

  1. To structure the content in the locale file

  2. To provide a rudimentary way to validate that some json represents a valid locale file

  3. To all conditional inclusion of CLDR content at compile time to help manage memory footprint. This capability is not yet built into Cldr.