When running for the first time, switch the interface language to English when judging that the system language is not Chinese.

https://github.com/2dust/v2rayN/issues/5670
pull/5767/head
2dust 2024-09-23 11:01:03 +08:00
parent 243dbab06a
commit 4813610492
1 changed files with 8 additions and 1 deletions

View File

@ -140,7 +140,14 @@ namespace ServiceLib.Handler
}
if (Utils.IsNullOrEmpty(config.uiItem.currentLanguage))
{
config.uiItem.currentLanguage = Global.Languages[0];
if (Thread.CurrentThread.CurrentCulture.Name.Equals("zh-cn", StringComparison.CurrentCultureIgnoreCase))
{
config.uiItem.currentLanguage = Global.Languages[0];
}
else
{
config.uiItem.currentLanguage = Global.Languages[2];
}
}
if (config.constItem == null)