elixir-cldr / cldr

Elixir implementation of CLDR/ICU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Older releases can no longer download locales since Github no longer redirects between organisations

kipcole9 opened this issue · comments

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:

  1. Upgrade to the current release. This is the preferred option.
  2. Configure ex_cldr to use a static location under user control and place the required locale files in that location. Add the data_dir option to config.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
commented

@kipcole9 Thanks for this! Issue has been resolved

Happy to hear that. Please do open an issue if you see any other issues.