use the LANG env var (if set) to determine the system language on Linux/Mac
Candidate fix for #3864
This commit is contained in:
@@ -196,7 +196,8 @@ Glib::ustring MultiLangMgr::getOSUserLanguage ()
|
||||
#elif defined (__linux__) || defined (__APPLE__)
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user