Changed: check locale is supported under linux

--HG--
branch : compatibility-develop
hg/compatibility-develop
Inky 6 years ago
parent 2ee59b8d27
commit 377ed0152a

@ -382,9 +382,15 @@ std::string CI18N::getSystemLanguageCode ()
}
}
#else
// only keep 2 first characters
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
}
}

Loading…
Cancel
Save