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) {
16 setlocale(LC_MESSAGES, "");
17 bindtextdomain(PROJECT_NAME, path);
18 textdomain(PROJECT_NAME);
22 inline wchar_t* chartowchar_t(const char *str)
24 size_t l = strlen(str)+1;
25 wchar_t* nstr = new wchar_t[l];
26 mbstowcs(nstr, str, l);
30 inline void changeCtype(const char *l)
33 ret = setlocale(LC_CTYPE, l);
35 std::cout<<"locale could not be set"<<std::endl;
37 std::cout<<"locale has been set to:"<<ret<<std::endl;
39 #define GETTEXT_HEADER