share/hedgewars/Data/Scripts/Locale.lua
author Wuzzy <Wuzzy2@mail.ru>
Fri, 31 Aug 2018 20:35:13 +0200
changeset 13725 ade61b4eb63f
parent 13088 2b5314cc356c
child 13728 247d1bcf3c5e
permissions -rw-r--r--
Don't load locale Lua script if LOCALE == "en"

-- Library for localizing strings in lua scripts

if LOCALE ~= "en" then
    HedgewarsScriptLoad("Locale/" .. tostring(LOCALE) .. ".lua")
end

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

function loc_noop(text)
    return text
end