share/hedgewars/Data/Scripts/Locale.lua
author c_korn
Mon, 03 Jun 2013 23:25:15 +0200
branch0.9.19
changeset 9112 cefab5ac8f0f
parent 8824 fe9eacd390f2
child 12013 3e615852f36e
permissions -rw-r--r--
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#deprecated-items - The Encoding key is deprecated.

-- Library for localizing strings in lua scripts

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

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