summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-12 20:25:48 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-12 20:25:48 +0300
commit745dca819d026690037a56f6d81958b968e5a822 (patch)
tree419eb3dc8eaf794978fa2e1a20e42200b81eecfe /src/client.cpp
parente83d1e8551d258fb4ce04d9aecc6f1cf3fcd0520 (diff)
downloadmanaplus-745dca819d026690037a56f6d81958b968e5a822.tar.gz
manaplus-745dca819d026690037a56f6d81958b968e5a822.tar.bz2
manaplus-745dca819d026690037a56f6d81958b968e5a822.tar.xz
manaplus-745dca819d026690037a56f6d81958b968e5a822.zip
Fix custom language selection in some linuxes.v1.1.11.12
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp7
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());