share/hedgewars/Data/Scripts/Locale.lua
author Wuzzy <Wuzzy2@mail.ru>
Fri, 02 Nov 2018 10:31:08 +0100
changeset 14075 a5be3ef4bbbe
parent 13731 247d1bcf3c5e
permissions -rw-r--r--
Update official challenge hashes, improve console logging (warning: racer #17 is missing!)

-- Library for localizing strings in lua scripts

if LOCALE ~= "en" then
    HedgewarsScriptLoad("Locale/" .. tostring(LOCALE) .. ".lua", false)
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