mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 18:28:52 +00:00
Remove ESX dependency
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||
description 'SkinChanger'
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
'locale.lua',
|
||||
'locales/de.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fr.lua',
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
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 exists'
|
||||
end
|
||||
|
||||
else
|
||||
return 'Locale [' .. Config.Locale .. '] does not exists'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _U(str, ...) -- Translate string first char uppercase
|
||||
return tostring(_(str, ...):gsub("^%l", string.upper))
|
||||
end
|
||||
Reference in New Issue
Block a user