Skip to content

Commit 4813610

Browse files
committed
When running for the first time, switch the interface language to English when judging that the system language is not Chinese.
#5670
1 parent 243dbab commit 4813610

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

v2rayN/ServiceLib/Handler/ConfigHandler.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,14 @@ public static int LoadConfig(ref Config? config)
140140
}
141141
if (Utils.IsNullOrEmpty(config.uiItem.currentLanguage))
142142
{
143-
config.uiItem.currentLanguage = Global.Languages[0];
143+
if (Thread.CurrentThread.CurrentCulture.Name.Equals("zh-cn", StringComparison.CurrentCultureIgnoreCase))
144+
{
145+
config.uiItem.currentLanguage = Global.Languages[0];
146+
}
147+
else
148+
{
149+
config.uiItem.currentLanguage = Global.Languages[2];
150+
}
144151
}
145152

146153
if (config.constItem == null)

0 commit comments

Comments
 (0)