aboutsummaryrefslogtreecommitdiff
path: root/src/gettext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gettext.h')
-rw-r--r--src/gettext.h12
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;
+}