Older releases can no longer download locales since Github no longer redirects between organisations
kipcole9 opened this issue · comments
Kip Cole commented
Older releases rely on downloading locales from https://github.com/kipcole9/cldr/.....
. The repository moved to the organization elixir-cldr
and Github has been redirecting requests from the old organization to the new but it appears from feedback that GitHub is no longer redirecting.
This means than on older releases (at least up to 2.11.1, possibly later), locales can no longer be downloaded automatically at compile time. There are two approaches to resolution:
- Upgrade to the current release. This is the preferred option.
- Configure
ex_cldr
to use a static location under user control and place the required locale files in that location. Add thedata_dir
option toconfig.exs
. For example:
# config.exs
config :ex_cldr,
data_dir: "/my/cldr/locales/dir"
Downloading locales manually
Locales can be downloaded using wget
as follows (this is the URL used in later releases)
# Example for the locale `th`. Replace `th` with the required locale name
# Replace `v2.11.1` with the release version you require. It's important to use the correct
# version number since formats and code are synchronised and must be kept in alignment.
wget https://raw.githubusercontent.com/elixir-cldr/cldr/v2.11.1/priv/cldr/locales/th.json
Kip Cole commented
Happy to hear that. Please do open an issue if you see any other issues.