From f3e462eb6b69127ef08891d96f3ff09955905352 Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Fri, 5 Sep 2025 02:15:48 +0200 Subject: [PATCH] Load new localization before firing change event --- Dalamud/Localization.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Dalamud/Localization.cs b/Dalamud/Localization.cs index 1e72c3075..1bca2d700 100644 --- a/Dalamud/Localization.cs +++ b/Dalamud/Localization.cs @@ -112,10 +112,12 @@ public class Localization : IServiceType } /// - /// Set up the UI language with "fallbacks"(original English text). + /// Set up the UI language with "fallbacks" (original English text). /// public void SetupWithFallbacks() { + Loc.SetupWithFallbacks(this.assembly); + this.DalamudLanguageCultureInfo = CultureInfo.InvariantCulture; foreach (var d in Delegate.EnumerateInvocationList(this.LocalizationChanged)) { @@ -128,8 +130,6 @@ public class Localization : IServiceType Log.Error(ex, "Exception during raise of {handler}", d.Method); } } - - Loc.SetupWithFallbacks(this.assembly); } /// @@ -144,6 +144,16 @@ public class Localization : IServiceType return; } + try + { + Loc.Setup(this.ReadLocData(langCode), this.assembly); + } + catch (Exception ex) + { + Log.Error(ex, "Could not load loc {0}. Setting up fallbacks.", langCode); + this.SetupWithFallbacks(); + } + this.DalamudLanguageCultureInfo = GetCultureInfoFromLangCode(langCode); foreach (var d in Delegate.EnumerateInvocationList(this.LocalizationChanged)) { @@ -156,16 +166,6 @@ public class Localization : IServiceType Log.Error(ex, "Exception during raise of {handler}", d.Method); } } - - try - { - Loc.Setup(this.ReadLocData(langCode), this.assembly); - } - catch (Exception ex) - { - Log.Error(ex, "Could not load loc {0}. Setting up fallbacks.", langCode); - this.SetupWithFallbacks(); - } } ///