mirror of
https://github.com/edubart/otclient.git
synced 2025-04-30 01:29:21 +02:00
fix initial language selection
fix language selection bug steps to reproduce: - go to c:/users/username/otclient and remove settings file - launch otclient - select english - restart otclient expected behaviour: no more startup prompts for language selection when selecting default language observed behaviour: everytime client gets restarted and you click the default language, it doesn't get saved if it didn't exist in config file previously
This commit is contained in:
parent
be7a7d365f
commit
fe6bbd6c21
@ -144,7 +144,10 @@ end
|
|||||||
|
|
||||||
function setLocale(name)
|
function setLocale(name)
|
||||||
local locale = installedLocales[name]
|
local locale = installedLocales[name]
|
||||||
if locale == currentLocale then return end
|
if locale == currentLocale then
|
||||||
|
g_settings.set('locale', name)
|
||||||
|
return
|
||||||
|
end
|
||||||
if not locale then
|
if not locale then
|
||||||
pwarning("Locale " .. name .. ' does not exist.')
|
pwarning("Locale " .. name .. ' does not exist.')
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user