Added localization support for en_US to be able to handle special cases

This commit is contained in:
Leon Styhre 2024-07-04 18:36:37 +02:00
parent 12e1a683e5
commit dfc217d006

View file

@ -133,22 +133,6 @@ namespace Utils
locale = "en_US";
}
// No need to perform translations if we're using the default language.
if (locale == "en_US") {
#if defined(_WIN64)
_configthreadlocale(_DISABLE_PER_THREAD_LOCALE);
const LCID localeID {LocaleNameToLCID(
Utils::String::stringToWideString(locale).c_str(), LOCALE_ALLOW_NEUTRAL_NAMES)};
SetThreadLocale(localeID);
#else
setenv("LANGUAGE", locale.c_str(), 1);
setenv("LANG", locale.c_str(), 1);
setlocale(LC_MESSAGES, std::string {locale + ".UTF-8"}.c_str());
#endif
textdomain(locale.c_str());
return;
}
std::string localePath;
localePath.append("/")
.append(locale)