View Source Cldr.Install (Cldr v2.38.0)
Provides functions for installing locales.
When installed as a package on from hex, Cldr
has only
the default locales ["en", "und"]
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.
Summary
Functions
Returns the full pathname of the locale's json file.
Install all available locales.
Install all the configured locales.
Download the requested locale from github into the client application's cldr data directory.
Returns a boolean
indicating if the requested locale is installed.
Returns a boolean
indicating if the requested locale has available
data but the data is stale (is a older version not supported by this
version of ex_cldr
.)
Functions
Returns the full pathname of the locale's json file.
locale
is any locale returned byCldr.known_locale_names/1
No checking of locale validity is performed.
Install all available locales.
Install all the configured locales.
Download the requested locale from github into the client application's cldr data directory.
locale
is any locale returned byCldr.known_locale_names/1
options
is a keyword list. Currently the only supported option is:force
which defaults tofalse
. Iftruthy
the 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.
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.
Returns a boolean
indicating if the requested locale has available
data but the data is stale (is a older version not supported by this
version of ex_cldr
.)