-
Notifications
You must be signed in to change notification settings - Fork 567
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
Localization fails with .utf8 suffixed locales #1864
Comments
Looking at the code, resolving the variable happens here:
But the main problem comes from parsing the variable which is done in:
So it seems the problem is actually in unic_langid crate.
It seems a more appropriate crate to parse the locale would be https://docs.rs/locale-types/0.4.0/locale_types/locale/index.html |
It seems to fail basically always. I have 3 locales enabled, en_US.utf8, en_GB.utf8 and nl_NL.utf8, and none of them listed in by druid. |
@ColinPitrat can you confirm this fixes it? Since there are multiple backends to take care of, I dont think we can just 123 switch to another library, that might have unintended consequences. There was already something to split the locale on macos, this extends that to X11, and GTK |
I didn't test it yet but I expect this would fix my problem indeed. Added a few nit comments. |
On my system, by default, the locale is:
If I run a druid UI with it, it fails to localize using fr-FR locales:
It works fine with
LANG=fr_FR
:It would be nice to:
The text was updated successfully, but these errors were encountered: