summaryrefslogtreecommitdiff
path: root/src/utils/gettexthelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-02 22:54:36 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-03 00:46:28 +0300
commit519c2796e52ea933f6de5a490aee1f1ab826ea5e (patch)
tree01205558a568663d1c1ff67fda39ee84ce4051ec /src/utils/gettexthelper.cpp
parent2d2bbb2fe5a0dc55cbf5b9616a78500704b6ea65 (diff)
downloadmanaverse-519c2796e52ea933f6de5a490aee1f1ab826ea5e.tar.gz
manaverse-519c2796e52ea933f6de5a490aee1f1ab826ea5e.tar.bz2
manaverse-519c2796e52ea933f6de5a490aee1f1ab826ea5e.tar.xz
manaverse-519c2796e52ea933f6de5a490aee1f1ab826ea5e.zip
Add support for custom NLS (without gettext).
Add configure flag --enable-customnls Add empty directory in data/translations/manaplus for suctom translations (po files from /po directory)
Diffstat (limited to 'src/utils/gettexthelper.cpp')
-rw-r--r--src/utils/gettexthelper.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/utils/gettexthelper.cpp b/src/utils/gettexthelper.cpp
index c93e0d97d..336cd3307 100644
--- a/src/utils/gettexthelper.cpp
+++ b/src/utils/gettexthelper.cpp
@@ -33,8 +33,10 @@
#ifdef WIN32
#include <string>
extern "C" char const *_nl_locale_name_default(void);
-#endif
-#endif
+#endif // WIN32
+#elif defined(ENABLE_CUSTOMNLS)
+#include "utils/translation/podict.h"
+#endif // ENABLE_NLS
#include "debug.h"
@@ -97,6 +99,8 @@ void GettextHelper::initLang()
}
bind_textdomain_codeset("manaplus", "UTF-8");
textdomain("manaplus");
+#elif defined(ENABLE_CUSTOMNLS)
+ mainTranslator = new PoDict("en");
#endif // ENABLE_NLS
}