Cldr v0.0.12 Cldr.Install
Support for installing locales on demand.
When installed as a package on from hex, Cldr
has only
the default locale, “en”, 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
Download the requested locale from github into the client app data directory
Install all the configured locales
Returns a boolean
indicating if the requested locale is installed
Functions
Returns the full pathname of the locale’s json file.
locale
is any locale returned byCldr.known_locales{}
Download the requested locale from github into the client app data directory.
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 http 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.