elixir-cldr/cldr_languages

Fallback to "original language" with to_string

Closed this issue · 2 comments

Hello!

We are running into some problems when using the "to_string" function. There is some cases, such as the "bs-Cyrl" language, that is not present in the known locales to English, so when using to_string, it returns :error.

We were wondering if adding an option to the to_string function, to indicate whether we want to fall back to the "original language", in this particular case it would be from "bs-Cyrl" to "bs".

Do you think that adding an option like that is a good idea?

I'm not sure this needs to be in the library. You could probably do the same in your own code and be in control how fallbacks are to be done.

Ok, @LostKobrakai thanks for your answer. We will implement this on our side.