Merge with 572a875474cb7c02682801dc30daab16a0d3c20b
This commit is contained in:
@@ -102,6 +102,8 @@ bool MultiLangMgr::isOSLanguageDetectSupported() {
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
#elif __linux__ || __APPLE__
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
@@ -114,7 +116,6 @@ Glib::ustring MultiLangMgr::getOSUserLanguage() {
|
||||
|
||||
if (isOSLanguageDetectSupported()) {
|
||||
|
||||
// TODO: Add support for other OS here
|
||||
#ifdef WIN32
|
||||
// When using old versions of MINGW this is not defined
|
||||
#ifdef __MINGW64_VERSION_MAJOR
|
||||
@@ -128,8 +129,10 @@ Glib::ustring MultiLangMgr::getOSUserLanguage() {
|
||||
langName=TranslateRFC2Language(localRFC);
|
||||
}
|
||||
#endif
|
||||
#elif __linux__ || __APPLE__
|
||||
langName = TranslateRFC2Language(std::setlocale(LC_CTYPE,""));
|
||||
#endif
|
||||
} else printf("Automatic language detection not supported on your OS\n");
|
||||
}
|
||||
|
||||
return langName;
|
||||
}
|
||||
|
Reference in New Issue
Block a user