From: Perttu Ahola Date: Wed, 9 Jan 2013 12:37:00 +0000 (+0300) Subject: Set locale properly when built without gettext support X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=10fdbf737513e48bfcfb9e90fe243dcd989c0476;p=zefram%2Fminetest%2Fminetest_engine.git Set locale properly when built without gettext support --- diff --git a/src/gettext.cpp b/src/gettext.cpp index d4dc719b..8000bf82 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 }