Browse Source

Fixed preferred language not loading on start

flabbet 1 year ago
parent
commit
03d28e772c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/PixiEditor/ViewModels/ViewModelMain.cs

+ 2 - 1
src/PixiEditor/ViewModels/ViewModelMain.cs

@@ -125,7 +125,8 @@ internal partial class ViewModelMain : ViewModelBase, ICommandsHandler
         CommandController = services.GetService<CommandController>();
 
         LocalizationProvider = services.GetRequiredService<ILocalizationProvider>();
-        LocalizationProvider.LoadData();
+        string code = Preferences.GetPreference<string>("LanguageCode", null);
+        LocalizationProvider.LoadData(code);
 
         WindowSubViewModel = services.GetService<WindowViewModel>();
         LayoutSubViewModel = services.GetService<LayoutViewModel>();