drucker und fixes
This commit is contained in:
parent
5e9804135d
commit
bebc98abca
29 changed files with 673 additions and 7 deletions
18
resources/[inventory]/pl_printer/locales/locale.lua
Normal file
18
resources/[inventory]/pl_printer/locales/locale.lua
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue