elixir-cldr / cldr

Elixir implementation of CLDR/ICU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unknown locale: lah

petrus-jvrensburg opened this issue · comments

Not sure if this is a bug, but when querying language population info using ex_cldr_territories

Cldr.Territory.info(:pak)

the response includes the "lah" group of languages, with a very high number of native speakers

"lah" => %{population_percent: 40}

But, when trying to add this to the ex_cldr backend as a supported locale, I get this error:

** (Cldr.UnknownLocaleError) Failed to install the locale named :lah. The locale name is not known.

In this case the error is correct. There is no locale lah in CLDR. There is no guarantee that all data cross-links. There isn't even a guarantee that all locales have the same data fields populated. Different locales have different levels of completion.

# This backend has every locale known to CLDR configured
iex> :lah in TestBackend.Cldr.known_locale_names()
false

# This is a list of all locales known to CLDR whether configured
# or not
iex> :lah in Cldr.all_locale_names()
false