share/hedgewars/Data/Scripts/Locale.lua
author koda
Fri, 29 Apr 2011 03:31:50 +0200
changeset 5188 d0461bd6d45b
parent 4854 881c8232b66a
child 5616 a96231121eac
permissions -rw-r--r--
some updates to the crossbuild system for mac most notably it chooses a single default architecture with more precision

-- 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