mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
fix(locale): server hotload and "external" kvp
External kvp's don't exist for the server, so we have to export the proper language.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
RegisterCommand('serverlocale', function(_, args, _)
|
||||
if args?[1] then
|
||||
SetResourceKvp('locale', args[1])
|
||||
TriggerEvent('ox_lib:setLocale', args[1])
|
||||
end
|
||||
end, true)
|
||||
|
||||
function lib.getServerLocale()
|
||||
return GetResourceKvpString('locale') or 'en-US'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user