summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp8
-rw-r--r--src/client.h2
2 files changed, 7 insertions, 3 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)
diff --git a/src/client.h b/src/client.h
index c6427a720..43937c956 100644
--- a/src/client.h
+++ b/src/client.h
@@ -348,7 +348,7 @@ private:
static Client *mInstance;
- static void bindTextDomain(char *name, char *path);
+ static void bindTextDomain(const char *const name, const char *const path);
Options mOptions;