share/hedgewars/Data/Scripts/Locale.lua
changeset 13731 247d1bcf3c5e
parent 13728 ade61b4eb63f
equal deleted inserted replaced
13730:eeeea1cfaf08 13731:247d1bcf3c5e
     1 -- Library for localizing strings in lua scripts
     1 -- Library for localizing strings in lua scripts
     2 
     2 
     3 if LOCALE ~= "en" then
     3 if LOCALE ~= "en" then
     4     HedgewarsScriptLoad("Locale/" .. tostring(LOCALE) .. ".lua")
     4     HedgewarsScriptLoad("Locale/" .. tostring(LOCALE) .. ".lua", false)
     5 end
     5 end
     6 
     6 
     7 function loc(text)
     7 function loc(text)
     8     if locale ~= nil and locale[text] ~= nil then return locale[text]
     8     if locale ~= nil and locale[text] ~= nil then return locale[text]
     9     else return text
     9     else return text