Skip to content

Commit

Permalink
When running for the first time, switch the interface language to Eng…
Browse files Browse the repository at this point in the history
…lish when judging that the system language is not Chinese.

#5670
  • Loading branch information
2dust committed Sep 23, 2024
1 parent 243dbab commit 4813610
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion v2rayN/ServiceLib/Handler/ConfigHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,14 @@ public static int LoadConfig(ref Config? config)
}
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)
Expand Down

0 comments on commit 4813610

Please sign in to comment.