diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-02 22:54:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-03 00:46:28 +0300 |
commit | 519c2796e52ea933f6de5a490aee1f1ab826ea5e (patch) | |
tree | 01205558a568663d1c1ff67fda39ee84ce4051ec /src/utils/gettexthelper.cpp | |
parent | 2d2bbb2fe5a0dc55cbf5b9616a78500704b6ea65 (diff) | |
download | mv-519c2796e52ea933f6de5a490aee1f1ab826ea5e.tar.gz mv-519c2796e52ea933f6de5a490aee1f1ab826ea5e.tar.bz2 mv-519c2796e52ea933f6de5a490aee1f1ab826ea5e.tar.xz mv-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.cpp | 8 |
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 } |