summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2013-12-31 17:20:03 +0100
committerkrzys-h <krzys_h@interia.pl>2013-12-31 17:20:03 +0100
commit8d30791595cf981b08310472faa2066a99aa9595 (patch)
treec862897b4e435c302a877ad29402eef63647e98c /src/app
parent999490e88bc699b671b94b88c9a4327d963db378 (diff)
downloadcolobot-8d30791595cf981b08310472faa2066a99aa9595.tar.gz
colobot-8d30791595cf981b08310472faa2066a99aa9595.tar.bz2
colobot-8d30791595cf981b08310472faa2066a99aa9595.zip
Ability to set language via ini file
If language autodetection doesn't work, someone might want to manually force the game to use correct language without using -language parameter every time
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 566be33..8b5533e 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -425,6 +425,16 @@ bool CApplication::Create()
return false;
}
+ if (GetProfile().GetLocalProfileString("Language", "Lang", path)) {
+ Language language;
+ if (ParseLanguage(path, language)) {
+ m_language = language;
+ GetLogger()->Error("Setting language '%s' from ini file\n", path.c_str());
+ } else {
+ GetLogger()->Error("Invalid language '%s' in ini file\n", path.c_str());
+ }
+ }
+
SetLanguage(m_language);
//Create the sound instance.