Cldr.Install (Cldr v2.21.0) View Source
Provides functions for installing locales.
When installed as a package on from hex, Cldr has only
the default locales ["en", "root"] installed and configured.
When other locales are added to the configuration Cldr will attempt to
download the locale from github
during compilation.
If Cldr is installed from github directly then all locales are already
installed.
Link to this section Summary
Functions
See Cldr.Config.client_data_dir/1.
Returns the full pathname of the locale's json file.
See Cldr.Config.client_locales_dir/1.
Install all available locales.
Install all the configured locales.
Download the requested locale from github into the client application's cldr data directory.
See Cldr.Config.locale_filename/1.
Returns a boolean indicating if the requested locale is installed.
Link to this section Functions
See Cldr.Config.client_data_dir/1.
Returns the full pathname of the locale's json file.
localeis any locale returned byCldr.known_locale_names/1
No checking of locale validity is performed.
See Cldr.Config.client_locales_dir/1.
Install all available locales.
Install all the configured locales.
Download the requested locale from github into the client application's cldr data directory.
localeis any locale returned byCldr.known_locale_names/1optionsis a keyword list. Currently the only supported option is:forcewhich defaults tofalse. Iftruthythe locale will be installed or re-installed.
The data directory is typically priv/cldr/locales.
This function is intended to be invoked during application compilation when a valid locale is configured but is not yet installed in the application.
An https request to the master github repository for Cldr is made
to download the correct version of the locale file which is then
written to the configured data directory.
See Cldr.Config.locale_filename/1.
Returns a boolean indicating if the requested locale is installed.
No checking of the validity of the locale itself is performed. The
check is based upon whether there is a locale file installed in the
client application or in Cldr itself.