diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-12 20:25:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-12 20:25:48 +0300 |
commit | 745dca819d026690037a56f6d81958b968e5a822 (patch) | |
tree | 419eb3dc8eaf794978fa2e1a20e42200b81eecfe /src | |
parent | e83d1e8551d258fb4ce04d9aecc6f1cf3fcd0520 (diff) | |
download | plus-745dca819d026690037a56f6d81958b968e5a822.tar.gz plus-745dca819d026690037a56f6d81958b968e5a822.tar.bz2 plus-745dca819d026690037a56f6d81958b968e5a822.tar.xz plus-745dca819d026690037a56f6d81958b968e5a822.zip |
Fix custom language selection in some linuxes.v1.1.11.12
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index 62f8ae504..8a6ec2116 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -294,7 +294,7 @@ Client::Client(const Options &options): #if ENABLE_NLS std::string lang = config.getValue("lang", ""); #ifdef WIN32 - if (lang == "") + if (!lang.empty()) lang = std::string(_nl_locale_name_default()); putenv((char*)("LANG=" + lang).c_str()); @@ -303,6 +303,11 @@ Client::Client(const Options &options): if (lang != "C") bindtextdomain("manaplus", "translations/"); #else + if (!lang.empty()) + { + putenv(const_cast<char*>(("LANG=" + lang).c_str())); + putenv(const_cast<char*>(("LANGUAGE=" + lang).c_str())); + } #ifdef ENABLE_PORTABLE bindtextdomain("manaplus", (std::string(PHYSFS_getBaseDir()) + "../locale/").c_str()); |