summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-31 23:50:06 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-31 23:50:06 +0300
commitf93993dd417e3d88927ac22628aebe976b9ad05f (patch)
treead0afd3c1873f8f191a2ee16d54e75250b57e0a5 /src/client.cpp
parent87e8f99916b8537e2a9bbe7ef80e8c6a250afb90 (diff)
downloadmanaplus-f93993dd417e3d88927ac22628aebe976b9ad05f.tar.gz
manaplus-f93993dd417e3d88927ac22628aebe976b9ad05f.tar.bz2
manaplus-f93993dd417e3d88927ac22628aebe976b9ad05f.tar.xz
manaplus-f93993dd417e3d88927ac22628aebe976b9ad05f.zip
Fix gettext under Android.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 858c7ff49..878dd9360 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -338,6 +338,10 @@ void Client::gameInit()
putenv(const_cast<char*>(("LANG=" + lang).c_str()));
putenv(const_cast<char*>(("LANGUAGE=" + lang).c_str()));
}
+#ifdef ANDROID
+ bindTextDomain("manaplus", (std::string(PHYSFS_getBaseDir())
+ + "/locale").c_str());
+#else
#ifdef ENABLE_PORTABLE
bindTextDomain("manaplus", (std::string(PHYSFS_getBaseDir())
+ "../locale/").c_str());
@@ -345,6 +349,7 @@ void Client::gameInit()
bindTextDomain("manaplus", LOCALEDIR);
#endif
#endif
+#endif
char *locale = setlocale(LC_MESSAGES, lang.c_str());
if (locale)
logger->log("locale: %s", locale);
@@ -422,7 +427,6 @@ void Client::gameInit()
"Exiting.", mLocalDataDir.c_str()));
}
-
resman->addToSearchPath(PKG_DATADIR "data/perserver/default", false);
#if defined __APPLE__
@@ -670,7 +674,7 @@ Client::~Client()
testsClear();
}
-void Client::bindTextDomain(char *name, char *path)
+void Client::bindTextDomain(const char *const name, const char *const path)
{
const char *const dir = bindtextdomain(name, path);
if (dir)