Scripts/resources/[custom_script]/aty_crew/locale.lua
2024-12-29 20:48:41 +01:00

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