diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-26 01:07:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-27 23:14:29 +0300 |
commit | 468b24f6aeab58838432a3dd9774ad2e7ac87ea8 (patch) | |
tree | b7f0dc5611957a4f362e15edf23d5aebe7c9a248 | |
parent | 9b174a5975914bba00719f1711ed8c327e24880b (diff) | |
download | manaplus-468b24f6aeab58838432a3dd9774ad2e7ac87ea8.tar.gz manaplus-468b24f6aeab58838432a3dd9774ad2e7ac87ea8.tar.bz2 manaplus-468b24f6aeab58838432a3dd9774ad2e7ac87ea8.tar.xz manaplus-468b24f6aeab58838432a3dd9774ad2e7ac87ea8.zip |
Fix own language selection in some systems like latest ubuntus.
-rw-r--r-- | src/client.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index 1ae9185e2..fe3723ef3 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -359,9 +359,17 @@ void Client::gameInit() #endif char *locale = setlocale(LC_MESSAGES, lang.c_str()); if (locale) + { logger->log("locale: %s", locale); + } else - logger->log("locale empty"); + { + locale = setlocale(LC_MESSAGES, (lang + ".utf8").c_str()); + if (locale) + logger->log("locale: %s", locale); + else + logger->log("locale empty"); + } bind_textdomain_codeset("manaplus", "UTF-8"); textdomain("manaplus"); #endif |