summaryrefslogtreecommitdiff
path: root/src/gettext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gettext.h')
-rw-r--r--src/gettext.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gettext.h b/src/gettext.h
index 493f9b21b..3413f3806 100644
--- a/src/gettext.h
+++ b/src/gettext.h
@@ -1,3 +1,4 @@
+#ifndef GETTEXT_HEADER
#include "config.h" // for USE_GETTEXT
#if USE_GETTEXT
@@ -12,7 +13,6 @@
inline void init_gettext(const char *path) {
#if USE_GETTEXT
- setlocale(LC_MESSAGES, "");
bindtextdomain(PROJECT_NAME, path);
textdomain(PROJECT_NAME);
#endif
@@ -25,3 +25,15 @@ inline wchar_t* chartowchar_t(const char *str)
mbstowcs(nstr, str, l);
return nstr;
}
+
+inline void changeCtype(const char *l)
+{
+ char *ret = NULL;
+ ret = setlocale(LC_CTYPE, l);
+ if(ret == NULL)
+ std::cout<<"locale could not be set"<<std::endl;
+ else
+ std::cout<<"locale has been set to:"<<ret<<std::endl;
+}
+#define GETTEXT_HEADER
+#endif