diff options
author | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-24 09:01:10 -0700 |
---|---|---|
committer | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-24 09:01:10 -0700 |
commit | 71b7d925970f38a993ff9f7c3f3939a0c0b8112b (patch) | |
tree | b8bf1e95011a901b0e20e1cb283b7d0ed98a9030 /src/gettext.h | |
parent | f4a08f7fb3c9a249ad1256e2cf1a2e2ca3f2a709 (diff) | |
parent | e034f8a2a372279edfc5a6c69dc14fb31c9a7685 (diff) | |
download | minetest-71b7d925970f38a993ff9f7c3f3939a0c0b8112b.tar.gz minetest-71b7d925970f38a993ff9f7c3f3939a0c0b8112b.tar.bz2 minetest-71b7d925970f38a993ff9f7c3f3939a0c0b8112b.zip |
Merge pull request #35 from Oblomov/master
some more gettext fixes
Diffstat (limited to 'src/gettext.h')
-rw-r--r-- | src/gettext.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gettext.h b/src/gettext.h index e74b4eb96..7c3a6ffab 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -1,21 +1,21 @@ -#ifdef GETTEXT_FOUND -#ifdef USE_GETTEXT +#if USE_GETTEXT #include <libintl.h> #else #define gettext(String) String -#define bindtextdomain(domain, dir) /* */ -#define textdomain(domain) /* */ -#endif -#else -#define gettext(String) String -#define bindtextdomain(domain, dir) /* */ -#define textdomain(domain) /* */ #endif #define _(String) gettext(String) #define gettext_noop(String) String #define N_(String) gettext_noop (String) +inline void init_gettext(const char *path) { +#if USE_GETTEXT + setlocale(LC_MESSAGES, ""); + bindtextdomain(PROJECT_NAME, path); + textdomain(PROJECT_NAME); +#endif +} + inline wchar_t* chartowchar_t(const char *str) { size_t l = strlen(str)+1; |