From f433921eb56ed75db9702b1b876fcea633e61c62 Mon Sep 17 00:00:00 2001 From: Archeb Date: Thu, 25 May 2023 12:14:25 +0100 Subject: [PATCH] localization improvement --- MainForm.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/MainForm.cs b/MainForm.cs index ae6dd49..9fddce8 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -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 } } } @@ -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;