-
Notifications
You must be signed in to change notification settings - Fork 26
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
Mixed locale support? #114
Comments
Hi @VorpalBlade , which localization system are you planning to use? Currently this library only supports gettext and fluent |
I'm not sure yet! I have tried to figure out to what extent fluent and gettext support mixed locales, without a great deal of success. I'm actually leaning towards trying to use icu4x, but there message handling isn't implemented yet. It does however properly handle data formatting. Gettext seems to only do messages if I understand things correctly. And with fluent I haven't figured it out, and havent gotten any replies to my questions either. |
I haven't tested yet, to be sure but I think maybe locale number formatting functionality is not yet available in the Rust implementation of |
As for gettext, I'm not sure, I haven't given any thought to the question yet. We currently use https://github.com/rust-locale/locale_config/ for https://docs.rs/i18n-embed/latest/i18n_embed/struct.DesktopLanguageRequester.html implementation, so if that library supports |
Do note it is not just LC_NUMERIC, POSIX defines a bunch of these for date formatting, measurements, sorting order, etc. But whatever solution is applied for one of them will likely be similar for all of them. |
Number formatting based on locales is indeed not implemented at the moment in the Fluent crate(s). There is work in progress to use icu4x (fluent-rs#269 and fluent-rs#269) as well as provide the Are there other pieces needed from the Fluent end of things related to this issue? |
Sorry if this is documented somewhere but I couldn't find it. How does mixed locale support work in this library? E.g. If I set
LC_MESSAGES
andLC_NUMERIC
to different values?I'm considering using this for a command line program of mine and proper mixed locale support is something I consider absolutely critical. I use it myself (I prefer English text due to poor translations, and poor searchability of translated errors. But I want Monday as first day of week, comma as the decimal separator, Swedish weekday names, 24h time, sane date format etc).
But before I invest time in using this I want to know that this fundamental feature is actually supported.
The text was updated successfully, but these errors were encountered: