mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(locale): setLocale
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
---@todo remove module and nui event
|
||||
RegisterNUICallback('init', function(_, cb)
|
||||
cb(1)
|
||||
|
||||
@@ -6,4 +5,11 @@ RegisterNUICallback('init', function(_, cb)
|
||||
action = 'loadLocales',
|
||||
data = {}
|
||||
})
|
||||
|
||||
local JSON = LoadResourceFile(cache.resource, ('locales/%s.json'):format(GetConvar('ox:locale', 'en'))) or LoadResourceFile(cache.resource, 'locales/en.json')
|
||||
|
||||
SendNUIMessage({
|
||||
action = 'setLocale',
|
||||
data = JSON and json.decode(JSON) or {}
|
||||
})
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user