diff options
author | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-20 08:56:35 -0700 |
---|---|---|
committer | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-20 08:56:35 -0700 |
commit | cef7bb06195f3923f5c47547b48fe6e6e51c932d (patch) | |
tree | ba62a3b476ea55aaf18cd6825f0e67050a6db631 /src/gettext.h | |
parent | d0810b0156073833b9966672c86b5fc3650dade9 (diff) | |
parent | a006b828a672083e1f81dc599f1a8f5f11d50768 (diff) | |
download | minetest-cef7bb06195f3923f5c47547b48fe6e6e51c932d.tar.gz minetest-cef7bb06195f3923f5c47547b48fe6e6e51c932d.tar.bz2 minetest-cef7bb06195f3923f5c47547b48fe6e6e51c932d.zip |
Merge pull request #22 from SpeedProg/master
added gettext support
Diffstat (limited to 'src/gettext.h')
-rw-r--r-- | src/gettext.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gettext.h b/src/gettext.h new file mode 100644 index 000000000..7f5f56e49 --- /dev/null +++ b/src/gettext.h @@ -0,0 +1,12 @@ +#include <libintl.h> +#define _(String) gettext(String) +#define gettext_noop(String) String +#define N_(String) gettext_noop (String) + +inline wchar_t* chartowchar_t(char *str) +{ + size_t l = strlen(str)+1; + wchar_t* nstr = new wchar_t[l]; + mbstowcs(nstr, str, l); + return nstr; +} |