diff --git a/common/text-to-speech.cpp b/common/text-to-speech.cpp index a32e4b66c35..6967d9f4d03 100644 --- a/common/text-to-speech.cpp +++ b/common/text-to-speech.cpp @@ -144,8 +144,6 @@ Array TextToSpeechManager::getVoiceIndicesByGender(TTSVoice::Gender gender) } void TextToSpeechManager::setLanguage(Common::String language) { - if (language == "C") - language = "en"; // The speech manager uses the ISO 639-1 for language codes (2 letter code) // if we get a longer language string, just take the first 2 letters from that // if it won't be a valid language code, the Manager just won't find any voice diff --git a/common/translation.cpp b/common/translation.cpp index 3c5cc5f28ea..423dd94318d 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -172,7 +172,7 @@ String TranslationManager::getCurrentCharset() const { String TranslationManager::getCurrentLanguage() const { if (_currentLang == -1) - return "C"; + return "en"; return _langs[_currentLang]; } @@ -211,7 +211,7 @@ String TranslationManager::getLangById(int id) const { case kTranslationAutodetectId: return ""; case kTranslationBuiltinId: - return "C"; + return "en"; default: if (id >= 0 && id - 1 < (int)_langs.size()) return _langs[id - 1]; diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 9df06b6932e..c797eca4654 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -527,7 +527,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &language, const #ifdef USE_TRANSLATION Common::String cl = TransMan.getCurrentLanguage(); #else - Common::String cl("C"); + Common::String cl("en"); #endif if (!cl.matchString(language, true)) return true; // Skip @@ -562,7 +562,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &language, const if (!_texts[textId]->_fontPtr) { error("Couldn't load font '%s'/'%s'", file.c_str(), scalableFile.c_str()); #ifdef USE_TRANSLATION - TransMan.setLanguage("C"); + TransMan.setLanguage("en"); Common::TextToSpeechManager *ttsMan; if ((ttsMan = g_system->getTextToSpeechManager()) != nullptr) ttsMan->setLanguage("en"); @@ -578,7 +578,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &language, const // However, still returns false here, probably to avoid ugly / garbage glyphs side-effects // FIXME If we return false anyway why would we attempt the fall-back in the first place? #ifdef USE_TRANSLATION - TransMan.setLanguage("C"); + TransMan.setLanguage("en"); Common::TextToSpeechManager *ttsMan; if ((ttsMan = g_system->getTextToSpeechManager()) != nullptr) ttsMan->setLanguage("en"); diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 42bac4e6313..a518f83ea3b 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -759,8 +759,6 @@ void GuiManager::initTextToSpeech() { return; #ifdef USE_TRANSLATION Common::String currentLanguage = TransMan.getCurrentLanguage(); - if (currentLanguage == "C") - currentLanguage = "en"; ttsMan->setLanguage(currentLanguage); #endif int volume = (ConfMan.getInt("speech_volume", "scummvm") * 100) / 256; diff --git a/gui/options.cpp b/gui/options.cpp index 1d35d89a72c..27c3a2fa068 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -2644,11 +2644,7 @@ void GlobalOptionsDialog::apply() { if (ttsMan) { #ifdef USE_TRANSLATION if (newLang != oldLang) { - if (newLang == "C") - ttsMan->setLanguage("en"); - else { - ttsMan->setLanguage(newLang); - } + ttsMan->setLanguage(newLang); _ttsVoiceSelectionPopUp->setSelected(0); } #else