summaryrefslogtreecommitdiff
path: root/src/gettext.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2013-01-09 15:37:00 +0300
committerKahrl <kahrl@gmx.net>2014-01-09 14:46:02 +0100
commit10fdbf737513e48bfcfb9e90fe243dcd989c0476 (patch)
tree9012107a054dd5acf76d09b24576f538da59fefc /src/gettext.cpp
parentc3eb7fe316fc74892288a92c1fe645f9834cc3ed (diff)
downloadminetest-10fdbf737513e48bfcfb9e90fe243dcd989c0476.tar.gz
minetest-10fdbf737513e48bfcfb9e90fe243dcd989c0476.tar.bz2
minetest-10fdbf737513e48bfcfb9e90fe243dcd989c0476.zip
Set locale properly when built without gettext support
Diffstat (limited to 'src/gettext.cpp')
-rw-r--r--src/gettext.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gettext.cpp b/src/gettext.cpp
index d4dc719b4..8000bf828 100644
--- a/src/gettext.cpp
+++ b/src/gettext.cpp
@@ -251,15 +251,17 @@ void init_gettext(const char *path,std::string configured_language) {
//errorstream << "Gettext debug: domainname = " << tdomain << "; codeset = "<< codeset << std::endl;
#endif // defined(_WIN32)
+#else
+ /* set current system default locale */
+ setlocale(LC_ALL, "");
+#endif // if USE_GETTEXT
+
/* no matter what locale is used we need number format to be "C" */
/* to ensure formspec parameters are evaluated correct! */
-
setlocale(LC_NUMERIC,"C");
infostream << "Message locale is now set to: "
<< setlocale(LC_ALL,0) << std::endl;
-
-#endif // if USE_GETTEXT
}