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:
Linden
2022-04-29 16:53:24 +10:00
parent 8af19bae42
commit 031cccd886
2 changed files with 7 additions and 1 deletions

View File

@@ -26,5 +26,6 @@ end
AddEventHandler('ox_lib:setLocale', loadLocale)
return function()
loadLocale(GetExternalKvpString('ox_lib', 'locale') or 'en-US')
local lang = IsDuplicityVersion() and lib.getServerLocale() or GetExternalKvpString('ox_lib', 'locale') or 'en-US'
loadLocale(lang)
end