aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_client.cpp')
-rw-r--r--src/script/lua_api/l_client.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp
index ba22a0424..a3605be79 100644
--- a/src/script/lua_api/l_client.cpp
+++ b/src/script/lua_api/l_client.cpp
@@ -188,6 +188,13 @@ int ModApiClient::l_get_node_or_nil(lua_State *L)
return 1;
}
+int ModApiClient::l_get_language(lua_State *L)
+{
+ char *locale = setlocale(LC_ALL, "");
+ lua_pushstring(L, locale);
+ return 1;
+}
+
int ModApiClient::l_get_wielded_item(lua_State *L)
{
Client *client = getClient(L);
@@ -373,4 +380,5 @@ void ModApiClient::Initialize(lua_State *L, int top)
API_FCT(take_screenshot);
API_FCT(get_privilege_list);
API_FCT(get_builtin_path);
+ API_FCT(get_language);
}