We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Godot version: 3.2
OS/device including version: Windows 10
Issue description:
OS.get_locale() does not return full locale Ex: 'zh_TW' or 'zh_CN' will return 'zh' only
String OS_Windows::get_locale() const { const _WinLocale *wl = &_win_locales[0]; LANGID langid = GetUserDefaultUILanguage(); String neutral; int lang = langid & ((1 << 9) - 1); int sublang = langid & ~((1 << 9) - 1); while (wl->locale) { if (wl->main_lang == lang && wl->sublang == SUBLANG_NEUTRAL) neutral = wl->locale; if (lang == wl->main_lang && sublang == wl->sublang) return wl->locale; wl++; } if (neutral != "") return neutral; return "en"; }
may be change to int sublang = langid >> 10; will work.
int sublang = langid >> 10;
The text was updated successfully, but these errors were encountered:
This seems to be Windows-specific, as I get en_US on Linux (with my system configured in English). So this is indeed a bug.
en_US
Sorry, something went wrong.
OS.get_locale()
Looks like this is OS-specific. I get "en-AU" on OSX (correct), "en_US" on linux (correct), and "en" on windows (only half correct).
OS::get_locale()
akien-mga
Successfully merging a pull request may close this issue.
Godot version:
3.2
OS/device including version:
Windows 10
Issue description:
OS.get_locale() does not return full locale
Ex: 'zh_TW' or 'zh_CN' will return 'zh' only
may be change to
int sublang = langid >> 10;
will work.The text was updated successfully, but these errors were encountered: