New Globalisation Changes

This commit is contained in:
Brett Hewitson 2021-12-03 10:00:04 +10:00
parent 034d7401d1
commit d4859e0722
10 changed files with 23 additions and 103 deletions

View file

@ -18,6 +18,7 @@ using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Xml;
@ -312,6 +313,7 @@ namespace ServerManagerTool
PluginHelper.Instance.BetaEnabled = this.BetaVersion;
PluginHelper.Instance.LoadPlugins(installPath, true);
PluginHelper.Instance.SetFetchProfileCallback(FetchProfiles);
OnResourceDictionaryChanged(Thread.CurrentThread.CurrentCulture.Name);
// check if we are starting ASM for the old server restart - no longer supported
if (e.Args.Any(a => a.StartsWith(Constants.ARG_AUTORESTART, StringComparison.OrdinalIgnoreCase)))
@ -458,6 +460,11 @@ namespace ServerManagerTool
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public void OnResourceDictionaryChanged(string languageCode)
{
PluginHelper.Instance.OnResourceDictionaryChanged(languageCode);
}
public static void ReconfigureLogging()
{
string logDir = Path.Combine(Config.Default.DataDir, Config.Default.LogsDir);

View file

@ -306,6 +306,8 @@ namespace ServerManagerTool
CurrentConfig.CultureName = AvailableLanguages.Instance.SelectedLanguage;
PopulateWindowsStatesComboBox();
App.Instance.OnResourceDictionaryChanged(CurrentConfig.CultureName);
}
private void StyleSelectionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)