From 519c2796e52ea933f6de5a490aee1f1ab826ea5e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Jan 2016 22:54:36 +0300 Subject: 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) --- src/utils/gettexthelper.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/utils/gettexthelper.cpp') 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 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 } -- cgit v1.2.3-70-g09d2