projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
876a15b
)
Use appropriate LC_ locale macro for Windows (#9230)
author
Montandalar
<jbis1337@hotmail.com>
Tue, 24 Dec 2019 18:13:22 +0000
(
05:13
+1100)
committer
SmallJoker
<SmallJoker@users.noreply.github.com>
Tue, 24 Dec 2019 18:13:22 +0000
(19:13 +0100)
* Wrap LC_ macro in ifdef
Windows does not have LC_MESSAGES in locale.h, so use LC_ALL on that platform
src/script/lua_api/l_client.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_client.cpp
b/src/script/lua_api/l_client.cpp
index 4aa7d814de33fab2bc94b6dcc9f339639ca1bcd6..fba18249293566ed6abb414d2b97eae1b5495e09 100644
(file)
--- 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 = "";