18 lines
487 B
Lua
18 lines
487 B
Lua
Locales = {} -- Don't Touch!
|
|
|
|
function _(str, ...) -- Translate string
|
|
if Locales[Config.Locale] then
|
|
if Locales[Config.Locale][str] then
|
|
return string.format(Locales[Config.Locale][str], ...)
|
|
else
|
|
return 'Oversættelse for [' .. Config.Locale .. '][' .. str .. '] findes ikke!'
|
|
end
|
|
end
|
|
|
|
return 'Sproget [' .. Config.Locale .. '] findes ikke.'
|
|
end
|
|
|
|
function _U(str, ...) -- Translate string first char uppercase
|
|
return tostring(_(str, ...):gsub("^%l", string.upper))
|
|
end
|