diff options
-rw-r--r-- | base/main.cpp | 3 | ||||
-rw-r--r-- | gui/GuiManager.cpp | 3 | ||||
-rw-r--r-- | gui/ThemeEngine.cpp | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/base/main.cpp b/base/main.cpp index 4858501126..dff9a0d564 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -362,9 +362,6 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { setupGraphics(system); - // Enable translation - TransMan.setLanguage(ConfMan.get("gui_language").c_str()); - // Init the event manager. As the virtual keyboard is loaded here, it must // take place after the backend is initiated and the screen has been setup system.getEventManager()->init(); diff --git a/gui/GuiManager.cpp b/gui/GuiManager.cpp index bbd7718d71..44c6530d7e 100644 --- a/gui/GuiManager.cpp +++ b/gui/GuiManager.cpp @@ -62,6 +62,9 @@ GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled), _tooltipCheck(false), // Clear the cursor memset(_cursor, 0xFF, sizeof(_cursor)); + + // Enable translation + TransMan.setLanguage(ConfMan.get("gui_language").c_str()); ConfMan.registerDefault("gui_theme", "scummmodern"); Common::String themefile(ConfMan.get("gui_theme")); diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 0d0fe8aecd..92ecf0346f 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -579,7 +579,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) { if (_texts[textId]->_fontPtr) FontMan.assignFontToName(file, _texts[textId]->_fontPtr); - // Fallback to non-localized font + // Fallback to non-localized font and default translation else { // Try built-in fonts _texts[textId]->_fontPtr = FontMan.getFontByName(file); @@ -593,7 +593,8 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) { FontMan.assignFontToName(file, _texts[textId]->_fontPtr); } - warning("Failed to load localized font '%s'. Using non-localized font instead", file.c_str()); + TransMan.setLanguage("C"); + warning("Failed to load localized font '%s'. Using non-localized font and default GUI language instead", file.c_str()); } } } |