share/hedgewars/Data/Scripts/Locale.lua
author nemo
Sun, 16 Sep 2018 09:25:10 -0400
changeset 13818 9c3f793cfe82
parent 13728 247d1bcf3c5e
permissions -rw-r--r--
update hashes changed in r79e13080b9db (critical sprites) ra675a94b5cc1 (critical scripts)

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