summaryrefslogtreecommitdiff
path: root/ilights
diff options
context:
space:
mode:
Diffstat (limited to 'ilights')
-rw-r--r--ilights/init.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/ilights/init.lua b/ilights/init.lua
index aee2a60..ed6f6e5 100644
--- a/ilights/init.lua
+++ b/ilights/init.lua
@@ -6,8 +6,14 @@ ilights = {}
-- Boilerplate to support localized strings if intllib mod is installed.
local S
-if minetest.get_modpath("intllib") then
- S = intllib.Getter()
+if minetest.global_exists("intllib") then
+ if intllib.make_gettext_pair then
+ -- New method using gettext.
+ S = intllib.make_gettext_pair()
+ else
+ -- Old method using text files.
+ S = intllib.Getter()
+ end
else
S = function(s) return s end
end