From 9baae3a701f7bdf50972d8381904d11eee77aa4e Mon Sep 17 00:00:00 2001 From: Constantin Wenger Date: Sat, 30 Jul 2011 10:14:58 +0200 Subject: set locales to C because en_US not installed on some systems, only UTF-8 version and en_US.UTF-8 does not work. --- src/gettext.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gettext.h') diff --git a/src/gettext.h b/src/gettext.h index 493f9b21b..790375165 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -25,3 +25,13 @@ 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"< Date: Sat, 30 Jul 2011 11:44:45 +0200 Subject: fixed redefinitivon of gettext.h is included more than once --- src/gettext.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gettext.h') diff --git a/src/gettext.h b/src/gettext.h index 790375165..a42820a15 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 @@ -35,3 +36,5 @@ inline void changeCtype(const char *l) else std::cout<<"locale has been set to:"< Date: Sat, 30 Jul 2011 18:35:55 +0200 Subject: this fixes problem with msvc++ and should work on other systems and so on anyway. --- src/gettext.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/gettext.h') diff --git a/src/gettext.h b/src/gettext.h index a42820a15..3413f3806 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -13,7 +13,6 @@ inline void init_gettext(const char *path) { #if USE_GETTEXT - setlocale(LC_MESSAGES, ""); bindtextdomain(PROJECT_NAME, path); textdomain(PROJECT_NAME); #endif -- cgit v1.2.3