Disable localization workaround in server
parent
22a59b3912
commit
bb54e2cf1d
|
@ -142,13 +142,14 @@ void init_gettext(const char *path,std::string configured_language) {
|
||||||
|
|
||||||
SetEnvironmentVariableA("LANGUAGE",configured_language.c_str());
|
SetEnvironmentVariableA("LANGUAGE",configured_language.c_str());
|
||||||
|
|
||||||
|
#ifndef SERVER
|
||||||
//very very dirty workaround to force gettext to see the right environment
|
//very very dirty workaround to force gettext to see the right environment
|
||||||
if (current_language_var != configured_language) {
|
if (current_language_var != configured_language) {
|
||||||
STARTUPINFO startupinfo;
|
STARTUPINFO startupinfo;
|
||||||
PROCESS_INFORMATION processinfo;
|
PROCESS_INFORMATION processinfo;
|
||||||
memset(&startupinfo,0,sizeof(startupinfo));
|
memset(&startupinfo,0,sizeof(startupinfo));
|
||||||
memset(&processinfo,0,sizeof(processinfo));
|
memset(&processinfo,0,sizeof(processinfo));
|
||||||
errorstream << "MSVC localization workaround aktive restating minetest in new environment!" << std::endl;
|
errorstream << "MSVC localization workaround active restating minetest in new environment!" << std::endl;
|
||||||
|
|
||||||
std::string parameters = "";
|
std::string parameters = "";
|
||||||
|
|
||||||
|
@ -199,6 +200,13 @@ void init_gettext(const char *path,std::string configured_language) {
|
||||||
else {
|
else {
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
errorstream << "*******************************************************" << std::endl;
|
||||||
|
errorstream << "Can't apply locale workaround for server!" << std::encl;
|
||||||
|
errorstream << "Expect language to be broken!" << std::endl;
|
||||||
|
errorstream << "*******************************************************" << std::endl;
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
setlocale(LC_ALL,configured_language.c_str());
|
setlocale(LC_ALL,configured_language.c_str());
|
||||||
|
|
Loading…
Reference in New Issue