summaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp
index 4aa7d814d..fba182492 100644
--- a/src/script/lua_api/l_client.cpp
+++ b/src/script/lua_api/l_client.cpp
@@ -230,7 +230,11 @@ int ModApiClient::l_get_node_or_nil(lua_State *L)
int ModApiClient::l_get_language(lua_State *L)
{
+#ifdef _WIN32
+ char *locale = setlocale(LC_ALL, NULL);
+#else
char *locale = setlocale(LC_MESSAGES, NULL);
+#endif
std::string lang = gettext("LANG_CODE");
if (lang == "LANG_CODE")
lang = "";