diff options
-rw-r--r-- | init.lua | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,5 +1,12 @@ --- Support the old multi-load method -intllib = rawget(_G, "intllib") or {} + +-- Old multi-load method compatibility +if rawget(_G, "intllib") then return end + +intllib = { + getters = {}, + strings = {}, +} + local MP = minetest.get_modpath("intllib") @@ -11,11 +18,6 @@ if not (LANG and (LANG ~= "")) then LANG = os.getenv("LANG") end if not (LANG and (LANG ~= "")) then LANG = "en" end LANG = LANG:sub(1, 2) --- Support the old multi-load method -intllib.getters = intllib.getters or {} - -intllib.strings = {} - local INS_CHAR = intllib.INSERTION_CHAR local insertion_pattern = "("..INS_CHAR.."?)"..INS_CHAR.."(%(?)(%d+)(%)?)" |