aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/base/main.cpp b/base/main.cpp
index c43b865251..e9c0b967d3 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -254,6 +254,15 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
warning(_("Engine does not support debug level '%s'"), token.c_str());
}
+#ifdef USE_TRANSLATION
+ Common::String previousLanguage = TransMan.getCurrentLanguage();
+ if (ConfMan.hasKey("gui_use_game_language")
+ && ConfMan.getBool("gui_use_game_language")
+ && ConfMan.hasKey("language")) {
+ TransMan.setLanguage(ConfMan.get("language"));
+ }
+#endif
+
// Initialize any game-specific keymaps
engine->initKeymap();
@@ -278,6 +287,10 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
// Reset the file/directory mappings
SearchMan.clear();
+#ifdef USE_TRANSLATION
+ TransMan.setLanguage(previousLanguage);
+#endif
+
// Return result (== 0 means no error)
return result;
}