Update README.md

This commit is contained in:
2026-04-15 11:17:51 +02:00
committed by Dev
parent b33c0769d4
commit 6e05d26114
7 changed files with 46 additions and 10 deletions

View File

@@ -34,6 +34,19 @@ public partial class App : Application
.Build();
host.Start();
// Apply persisted language before any UI is created so bindings resolve to the saved culture.
try
{
var settings = host.Services.GetRequiredService<SettingsService>().GetSettingsAsync().GetAwaiter().GetResult();
if (!string.IsNullOrWhiteSpace(settings.Lang))
Localization.TranslationSource.Instance.CurrentCulture = new System.Globalization.CultureInfo(settings.Lang);
}
catch (Exception ex)
{
Log.Warning(ex, "Failed to apply persisted language at startup");
}
App app = new();
app.InitializeComponent();