1
0
Fork 0
forked from Simnation/Main
Main/resources/[inventory]/pl_printer/locales/locale.lua
2025-06-26 02:53:14 +02:00

18 lines
No EOL
400 B
Lua

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)