diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-29 20:19:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-29 20:19:39 +0300 |
commit | b1e1038b7f755138999865af1ffd53047e06b853 (patch) | |
tree | 995466017f9476eea8f3a43d8fc697e23236ff89 | |
parent | deca767aa228a9b05cd87d2fd8ff536079000893 (diff) | |
download | mv-b1e1038b7f755138999865af1ffd53047e06b853.tar.gz mv-b1e1038b7f755138999865af1ffd53047e06b853.tar.bz2 mv-b1e1038b7f755138999865af1ffd53047e06b853.tar.xz mv-b1e1038b7f755138999865af1ffd53047e06b853.zip |
Add debug lines to check how gettext working.
-rw-r--r-- | src/client.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp index 273806c3a..a47b16388 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -339,7 +339,9 @@ void Client::gameInit() { putenv(const_cast<char*>(("LANG=" + lang).c_str())); putenv(const_cast<char*>(("LANGUAGE=" + lang).c_str())); + logger->log("set lang: " + lang); } + logger->log("lang1=%s", getenv("LANG")); #ifdef ANDROID bindTextDomain("manaplus", (std::string(PHYSFS_getBaseDir()) + "/locale").c_str()); @@ -357,21 +359,27 @@ void Client::gameInit() #endif #endif #endif + logger->log("lang2=%s", getenv("LANG")); char *locale = setlocale(LC_MESSAGES, lang.c_str()); + logger->log("lang3=%s", getenv("LANG")); if (locale) { logger->log("locale: %s", locale); } else { + logger->log("lang4=%s", getenv("LANG")); locale = setlocale(LC_MESSAGES, (lang + ".utf8").c_str()); + logger->log("lang5=%s", getenv("LANG")); if (locale) logger->log("locale: %s", locale); else logger->log("locale empty"); } bind_textdomain_codeset("manaplus", "UTF-8"); + logger->log("lang6=%s", getenv("LANG")); textdomain("manaplus"); + logger->log("lang7=%s", getenv("LANG")); #endif #if defined(WIN32) || defined(__APPLE__) |