2 #include "config.h" // for USE_GETTEXT
7 #define gettext(String) String
10 #define _(String) gettext(String)
11 #define gettext_noop(String) String
12 #define N_(String) gettext_noop (String)
14 inline void init_gettext(const char *path) {
18 setlocale(LC_MESSAGES, "");
20 bindtextdomain(PROJECT_NAME, path);
21 textdomain(PROJECT_NAME);
25 inline wchar_t* chartowchar_t(const char *str)
27 size_t l = strlen(str)+1;
28 wchar_t* nstr = new wchar_t[l];
29 mbstowcs(nstr, str, l);
33 inline void changeCtype(const char *l)
36 ret = setlocale(LC_CTYPE, l);
38 std::cout<<"locale could not be set"<<std::endl;
40 std::cout<<"locale has been set to:"<<ret<<std::endl;
42 #define GETTEXT_HEADER