From 48136104921c09db84f21ad09137794bc0892a63 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:01:03 +0800 Subject: [PATCH] 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 --- v2rayN/ServiceLib/Handler/ConfigHandler.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index 8e72799f..e368af1e 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -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)