share/hedgewars/Data/Scripts/Locale.lua
author Henek
Mon, 11 Apr 2011 00:35:53 +0200
changeset 5138 f991f87969ff
parent 4854 881c8232b66a
child 5616 a96231121eac
permissions -rw-r--r--
now Random Weapons will show the weapon you will get during the other players turns not tested online yet, would be happy if someone could and report to me results

-- Library for localizing strings in lua scripts

local lang = loadfile(GetDataPath() .. "Locale/" .. tostring(L) .. ".lua")

if lang ~= nil then
    lang()
end

function loc(text)
    if lang ~= nil and locale ~= nil and locale[text] ~= nil then return locale[text]
    else return text
    end
end