aboutsummaryrefslogtreecommitdiff
path: root/src/gettext.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-23 19:04:37 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-23 19:04:37 +0300
commit2587bb361cfc96b3a695d1476e39b9c0ecaa6553 (patch)
tree6e6a35e0ee35883201189df9c545cc44b7a06658 /src/gettext.h
parent90d793f8f369bf1431d7a915198cd49b98bbe2d7 (diff)
parent976ec31c1faedc3a34935c3aafd6a868e222d1ad (diff)
downloadminetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.tar.gz
minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.tar.bz2
minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.zip
merged the content type extension and delta
Diffstat (limited to 'src/gettext.h')
-rw-r--r--src/gettext.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gettext.h b/src/gettext.h
new file mode 100644
index 000000000..8ddb95346
--- /dev/null
+++ b/src/gettext.h
@@ -0,0 +1,19 @@
+#ifdef USE_GETTEXT
+#include <libintl.h>
+#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 wchar_t* chartowchar_t(const char *str)
+{
+ size_t l = strlen(str)+1;
+ wchar_t* nstr = new wchar_t[l];
+ mbstowcs(nstr, str, l);
+ return nstr;
+}