How to retrieve a list of available locales?
HeRo002 opened this issue · 3 comments
Is there a way to retrieve a list of available locales using Fluent.runtime (or maybe Babel)?
Or would I have to retrieve a list of folders directly from the operating system?
How do I do that? :-)
Thank you.
"available" is subjective to your app, we don't control how and where you store locales and or how you load resources.
For the future, questions like this are better addressed on our discourse : https://discourse.mozilla.org/c/fluent/262
To clarify some details that are specific to the python impl, https://www.projectfluent.org/python-fluent/fluent.runtime/stable/usage.html documents how the python impl actually suggests to structure your localization resources.
There's no utility though to determine available locales.
Also, that list doesn't actually show up, the list of locales you'd want to pass in to the FluentLocalization class is the list of requested locales, it doesn't matter in practice on whether those exist or not.
Thank you for your answers!