summaryrefslogtreecommitdiff
path: root/src/gettext.h
diff options
context:
space:
mode:
authorConstantin Wenger <constantin.wenger@googlemail.com>2011-07-30 10:14:58 +0200
committerConstantin Wenger <constantin.wenger@googlemail.com>2011-07-30 22:08:16 +0200
commit9baae3a701f7bdf50972d8381904d11eee77aa4e (patch)
tree2e76ca208ed28df66c6b22001dc1590dc6cf7736 /src/gettext.h
parent92f504f98d4af7a31df7b1bfa80fce114638f4cf (diff)
downloadminetest-9baae3a701f7bdf50972d8381904d11eee77aa4e.tar.gz
minetest-9baae3a701f7bdf50972d8381904d11eee77aa4e.tar.bz2
minetest-9baae3a701f7bdf50972d8381904d11eee77aa4e.zip
set locales to C because en_US not installed on some systems, only UTF-8 version and en_US.UTF-8 does not work.
Diffstat (limited to 'src/gettext.h')
-rw-r--r--src/gettext.h10
1 files changed, 10 insertions, 0 deletions
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"<<std::endl;
+ else
+ std::cout<<"locale has been set to:"<<ret<<std::endl;
+}