mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Use appropriate LC_ locale macro for Windows (#9230)
* Wrap LC_ macro in ifdef Windows does not have LC_MESSAGES in locale.h, so use LC_ALL on that platform
This commit is contained in:
parent
876a15bd75
commit
44458896d9
@ -230,7 +230,11 @@ int ModApiClient::l_get_node_or_nil(lua_State *L)
|
|||||||
|
|
||||||
int ModApiClient::l_get_language(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);
|
char *locale = setlocale(LC_MESSAGES, NULL);
|
||||||
|
#endif
|
||||||
std::string lang = gettext("LANG_CODE");
|
std::string lang = gettext("LANG_CODE");
|
||||||
if (lang == "LANG_CODE")
|
if (lang == "LANG_CODE")
|
||||||
lang = "";
|
lang = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user