use the LANG env var (if set) to determine the system language on Linux/Mac
Candidate fix for #3864
This commit is contained in:
parent
14e3f0e88d
commit
9a47164c46
@ -196,7 +196,8 @@ Glib::ustring MultiLangMgr::getOSUserLanguage ()
|
|||||||
#elif defined (__linux__) || defined (__APPLE__)
|
#elif defined (__linux__) || defined (__APPLE__)
|
||||||
|
|
||||||
// Query the current locale and force decimal point to dot.
|
// Query the current locale and force decimal point to dot.
|
||||||
if (const char* locale = setlocale (LC_CTYPE, "")) {
|
const char *locale = getenv("LANG");
|
||||||
|
if (locale || (locale = setlocale (LC_CTYPE, ""))) {
|
||||||
langName = localeToLang (locale);
|
langName = localeToLang (locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user