This commit is contained in:
Nordi98 2025-06-26 02:53:14 +02:00
parent b863bc9763
commit f653901eb9
33 changed files with 665 additions and 478 deletions

View file

@ -0,0 +1,18 @@
Locales = {}
LocalLang = {}
function LoadLocale(lang)
local file = LoadResourceFile(GetCurrentResourceName(), 'locales/' .. lang .. '.json')
if file then
LocalLang = json.decode(file)
else
print('[Locale] Translation file not found for language: ' .. lang)
end
end
function Locale(key)
return LocalLang[key] or key
end
-- Load language
LoadLocale(Config.Locale)