share/hedgewars/Data/Scripts/Locale.lua
changeset 13088 2b5314cc356c
parent 12013 3e615852f36e
child 13723 ade61b4eb63f
equal deleted inserted replaced
13087:b6df6283e2ba 13088:2b5314cc356c
     1 -- Library for localizing strings in lua scripts
     1 -- Library for localizing strings in lua scripts
     2 
     2 
     3 local lang = HedgewarsScriptLoad("Locale/" .. tostring(L) .. ".lua")
     3 local lang = HedgewarsScriptLoad("Locale/" .. tostring(LOCALE) .. ".lua")
     4 
     4 
     5 function loc(text)
     5 function loc(text)
     6     if locale ~= nil and locale[text] ~= nil then return locale[text]
     6     if locale ~= nil and locale[text] ~= nil then return locale[text]
     7     else return text
     7     else return text
     8     end
     8     end