refactor(server/locale): get array of valid locales

This commit is contained in:
Linden
2022-05-06 16:37:36 +10:00
parent f6b2df0e75
commit d4b5e0402c
3 changed files with 28 additions and 3 deletions

View File

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