X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fgettext.cpp;h=0c0e520ca169e4322834edc5cfb647e0f92e6959;hb=2fee2baf98cd452f7d0e4acb6c82617b7c7b995a;hp=d4dc719b4e1d19c2a760f6511f9ebb66d8cdf5fa;hpb=bb54e2cf1d91381e46ba24654a39cc9c1cbadb23;p=oweals%2Fminetest.git diff --git a/src/gettext.cpp b/src/gettext.cpp index d4dc719b4..0c0e520ca 100644 --- a/src/gettext.cpp +++ b/src/gettext.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "gettext.h" #include "util/string.h" -#if USE_GETTEXT and defined(_MSC_VER) +#if USE_GETTEXT && defined(_MSC_VER) #include #include #include @@ -202,7 +202,7 @@ void init_gettext(const char *path,std::string configured_language) { } #else errorstream << "*******************************************************" << std::endl; - errorstream << "Can't apply locale workaround for server!" << std::encl; + errorstream << "Can't apply locale workaround for server!" << std::endl; errorstream << "Expect language to be broken!" << std::endl; errorstream << "*******************************************************" << std::endl; @@ -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 }