Browse Source

Fix switching locale from English

The locale code used the `forceLocale = "en"` fallback when
the locale was set to English, so switching from English
did not actually change the language.
pull/5633/head
Gleb Mazovetskiy 3 years ago committed by Anders Jenbo
parent
commit
56cd425396
  1. 10
      Source/utils/language.cpp

10
Source/utils/language.cpp

@ -361,6 +361,14 @@ void LanguageInitialize()
translationKeys = nullptr;
translationValues = nullptr;
const std::string lang(GetLanguageCode());
if (lang == "en") {
// English does not have a translation file.
GetLocalPluralId = PluralIfNotOne;
return;
}
if (IsSmallFontTall() && !HaveExtraFonts()) {
UiErrorOkDialog(
"Missing fonts.mpq",
@ -372,8 +380,6 @@ void LanguageInitialize()
forceLocale = "en";
}
const std::string lang(GetLanguageCode());
AssetHandle handle;
const uint32_t loadTranslationsStart = SDL_GetTicks();

Loading…
Cancel
Save