Skip to content

Commit

Permalink
localization improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Archeb committed May 25, 2023
1 parent be40b61 commit f433921
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ public MainForm()
quitCommand
} },
new SubMenuItem { Text = Resources.HELP , Items = {
new SubMenuItem { Text = Resources.LANGUAGE , Items = {
new Command { MenuText = "English" },
new Command { MenuText = "简体中文" }
} },
aboutCommand
} }
}
Expand Down Expand Up @@ -255,7 +251,8 @@ private void StartTracerouteButton_Click(object sender, EventArgs e)
ResetMap(); // 重置地图
try
{
var instance = new NextTraceWrapper(HostInputBox.Text + " --raw " + dataProviderSelection.SelectedKey);
string language = System.Globalization.CultureInfo.CurrentUICulture.Name.StartsWith("zh") ? " --language cn " : " --language en ";
var instance = new NextTraceWrapper(HostInputBox.Text + " --raw " + dataProviderSelection.SelectedKey + language);
HostInputBox.Items.Add(new ListItem { Text = HostInputBox.Text });
CurrentInstance = instance;
startTracerouteButton.Text = Resources.STOP;
Expand Down

0 comments on commit f433921

Please sign in to comment.