From c44318a253783dde37e3bb688e29927da3b4cac0 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 9 Nov 2019 16:15:05 +0100 Subject: [CSM] Fix and improve minetest.get_language() Previously this method would accidentally reset the locale and break everything. --- doc/client_lua_api.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/client_lua_api.txt') diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index a7e928f56..c24de8d85 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -634,7 +634,9 @@ Minetest namespace reference the trailing separator. This is useful to load additional Lua files contained in your mod: e.g. `dofile(minetest.get_modpath(minetest.get_current_modname()) .. "stuff.lua")` -* `minetest.get_language()`: returns the currently set gettext language. +* `minetest.get_language()`: returns two strings + * the current gettext locale + * the current language code (the same as used for client-side translations) * `minetest.get_version()`: returns a table containing components of the engine version. Components: * `project`: Name of the project, eg, "Minetest" -- cgit v1.2.3