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
This commit is contained in:
2dust 2024-09-23 11:01:03 +08:00
parent 243dbab06a
commit 4813610492

View file

@ -139,9 +139,16 @@ namespace ServiceLib.Handler
config.uiItem.mainColumnItem = new(); config.uiItem.mainColumnItem = new();
} }
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 = Global.Languages[0]; config.uiItem.currentLanguage = Global.Languages[0];
} }
else
{
config.uiItem.currentLanguage = Global.Languages[2];
}
}
if (config.constItem == null) if (config.constItem == null)
{ {