diff options
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/GuiManager.cpp | 3 | ||||
| -rw-r--r-- | gui/ThemeEngine.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
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()); } } } |
