share/hedgewars/Data/Scripts/Locale.lua
author Henek
Mon, 13 Dec 2010 04:52:23 +0100
changeset 4513 1dd97c710f5a
parent 4502 759c1a3bb156
child 4854 881c8232b66a
permissions -rw-r--r--
added general scripts to multiplayer and added option for scripts to allow user set schemes or weapon sets.

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