From 12e3f07f55ec0abe09122fa31dc15f38032716c8 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 13 Aug 2020 18:39:26 +0300 Subject: Set global culture info for FSE and MS. --- .../MachineStudio/Tango.MachineStudio.UI/App.xaml.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs index 006b9a361..7eab5066a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs @@ -25,6 +25,8 @@ using Tango.Core; using Tango.BL; using Tango.Integration.Operation; using System.Net; +using System.Globalization; +using System.Windows.Markup; namespace Tango.MachineStudio.UI { @@ -40,6 +42,18 @@ namespace Tango.MachineStudio.UI protected override void OnStartup(StartupEventArgs e) { + //Set culture info. + var enUSCulture = new CultureInfo("en-US"); + + Thread.CurrentThread.CurrentCulture = enUSCulture; + Thread.CurrentThread.CurrentUICulture = enUSCulture; + CultureInfo.DefaultThreadCurrentCulture = enUSCulture; + CultureInfo.DefaultThreadCurrentUICulture = enUSCulture; + + FrameworkElement.LanguageProperty.OverrideMetadata( + typeof(FrameworkElement), + new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag))); + StartupArgs = e.Args; #if DEBUG -- cgit v1.3.1