mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-12 11:18:48 +00:00
Fixed the system language judgment during the first run
https://github.com/2dust/v2rayN/issues/6638
This commit is contained in:
parent
d471336994
commit
ba2a636dd2
1 changed files with 3 additions and 8 deletions
|
@ -105,14 +105,9 @@ namespace ServiceLib.Handler
|
||||||
|
|
||||||
if (Utils.IsNullOrEmpty(config.UiItem.CurrentLanguage))
|
if (Utils.IsNullOrEmpty(config.UiItem.CurrentLanguage))
|
||||||
{
|
{
|
||||||
if (Thread.CurrentThread.CurrentCulture.Name.Equals("zh-cn", StringComparison.CurrentCultureIgnoreCase))
|
config.UiItem.CurrentLanguage = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName.Equals("zh", StringComparison.CurrentCultureIgnoreCase)
|
||||||
{
|
? Global.Languages.First()
|
||||||
config.UiItem.CurrentLanguage = Global.Languages.First();
|
: Global.Languages[2];
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
config.UiItem.CurrentLanguage = Global.Languages[2];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config.ConstItem ??= new ConstItem();
|
config.ConstItem ??= new ConstItem();
|
||||||
|
|
Loading…
Reference in a new issue