Changed: check locale is supported under linux

--HG--
branch : patches-from-atys
Inky 6 years ago
parent ccfffe0a8c
commit 41c3d0cbe0

@ -382,9 +382,15 @@ std::string CI18N::getSystemLanguageCode ()
} }
} }
#else #else
// only keep 2 first characters
if (lang.size() > 1) if (lang.size() > 1)
_SystemLanguageCode = NLMISC::toLower(lang).substr(0, 2); {
// only keep 2 first characters
lang = NLMISC::toLower(lang).substr(0, 2);
// language code supported?
if (isLanguageCodeSupported(lang))
_SystemLanguageCode = lang;
}
#endif #endif
} }
} }

Loading…
Cancel
Save