日常更新
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
namespace ChromeboxFanControl;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
private static void Main()
|
||||
{
|
||||
ApplicationConfiguration.Initialize();
|
||||
|
||||
var config = AppConfig.LoadMerged();
|
||||
var lang = config.Language;
|
||||
if (string.IsNullOrEmpty(lang) || lang.Equals("auto", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var culture = System.Globalization.CultureInfo.CurrentUICulture;
|
||||
if (culture.Name is "zh-TW" or "zh-HK" or "zh-MO" or "zh-Hant")
|
||||
lang = "zh-Hant";
|
||||
else if (culture.Name.StartsWith("zh", StringComparison.OrdinalIgnoreCase))
|
||||
lang = "zh-Hans";
|
||||
else
|
||||
lang = "en";
|
||||
}
|
||||
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
|
||||
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
namespace ChromeboxFanControl;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
private static void Main()
|
||||
{
|
||||
ApplicationConfiguration.Initialize();
|
||||
|
||||
var config = AppConfig.LoadMerged();
|
||||
var lang = config.Language;
|
||||
if (string.IsNullOrEmpty(lang) || lang.Equals("auto", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var culture = System.Globalization.CultureInfo.CurrentUICulture;
|
||||
if (culture.Name is "zh-TW" or "zh-HK" or "zh-MO" or "zh-Hant")
|
||||
lang = "zh-Hant";
|
||||
else if (culture.Name.StartsWith("zh", StringComparison.OrdinalIgnoreCase))
|
||||
lang = "zh-Hans";
|
||||
else
|
||||
lang = "en";
|
||||
}
|
||||
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
|
||||
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user