mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 08:01:40 +00:00
4f6a40199d
- 4 tabs indent - add Polish translation (from deviljin112) - add more components (eyes color / arms 2 / watches / bracelets / blemishes / ageing / blush / complexion / sun damages / freckles / chest hair / body blemishes) - increment version
22 lines
492 B
Lua
22 lines
492 B
Lua
Locales = {}
|
|
|
|
function _(str, ...) -- Translate string
|
|
|
|
if Locales[Config.Locale] ~= nil then
|
|
|
|
if Locales[Config.Locale][str] ~= nil then
|
|
return string.format(Locales[Config.Locale][str], ...)
|
|
else
|
|
return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist'
|
|
end
|
|
|
|
else
|
|
return 'Locale [' .. Config.Locale .. '] does not exist'
|
|
end
|
|
|
|
end
|
|
|
|
function _U(str, ...) -- Translate string first char uppercase
|
|
return tostring(_(str, ...):gsub("^%l", string.upper))
|
|
end
|