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 | 489a7ef3247f1db1f44efa2c7fbafb70c00f7812 (patch) | |
tree | 0fdfa167644040940348abeac58709110a971a0c /src/gettext.h | |
parent | 2095b1581615f7b8c4f008886837fbbeaf75faec (diff) | |
parent | e787e16a833a988e9658dbfe556cc2cc1d7d0714 (diff) | |
download | minetest-489a7ef3247f1db1f44efa2c7fbafb70c00f7812.tar.gz minetest-489a7ef3247f1db1f44efa2c7fbafb70c00f7812.tar.bz2 minetest-489a7ef3247f1db1f44efa2c7fbafb70c00f7812.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; +} |