Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure_i18n removes unrecognized locales from available_locales #315

Open
aergonaut opened this issue Dec 7, 2024 · 0 comments
Open

Comments

@aergonaut
Copy link

I'm evaluating Worldwide, and I noticed something unexpected happening after running configure_i18n.

We have Haitian Creole ht as one of our supported locales. Our available_locales list before running configure_i18n looks something like:

config.i18n.available_locales = [:en, :es, :ht, ...]

After calling configure_i18n, I noticed that ht is no longer in the available_locales.

I believe this is because configure_i18n calls Worldwide::Cldr.fallbacks.descendants for each locale, but descendants(:ht) returns nothing []. And that seems to be because ht is not a known locale, according to Worldwide::Locales.known. I was a little surprised by this, but checking CLDR, it seems true that ht is not covered.

However, I would expect that Worldwide would ignore locales that it does not know about, rather than removing them from the list. We have been using ht via Google Translate, which does support ht as a possible locale, so I would still like to be able to use Worldwide for our other locales, even if all of its features wouldn't be available in some of our locales.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant