Demo adds language switching

This commit is contained in:
NaBian committed 2018-10-25 14:06:23 +08:00
1 parent 8477771161
commit ca0c8ce7a0
55 files changed
+313 -123

No files matched your search

+10 -1
View File
@@ -1,6 +1,7 @@
using System.Globalization;
using System.Threading;
using System.Windows;
using HandyControlDemo.Data;
namespace HandyControlDemo
{
@@ -12,7 +13,15 @@ namespace HandyControlDemo
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
GlobalData.Init();
Thread.CurrentThread.CurrentUICulture = new CultureInfo(GlobalData.Config.Lang);
}
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
GlobalData.Save();
}
}
}