From cd5235b08815411ef9c7d434b11f7a853d6485b6 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Sat, 4 Sep 2021 23:44:44 +0200 Subject: [PATCH] fix: restore Dalamud.Localization.Localize() --- Dalamud/Localization.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Dalamud/Localization.cs b/Dalamud/Localization.cs index 9f35e5afb..e8bb28578 100644 --- a/Dalamud/Localization.cs +++ b/Dalamud/Localization.cs @@ -51,6 +51,20 @@ namespace Dalamud /// public event LocalizationChangedDelegate LocalizationChanged; + /// + /// Search the set-up localization data for the provided assembly for the given string key and return it. + /// If the key is not present, the fallback is shown. + /// The fallback is also required to create the string files to be localized. + /// + /// The string key to be returned. + /// The fallback string, usually your source language. + /// The localized string, fallback or string key if not found. + // TODO: This breaks loc export, since it's being called without string args. Fix in CheapLoc. + public static string Localize(string key, string fallBack) + { + return Loc.Localize(key, fallBack, Assembly.GetCallingAssembly()); + } + /// /// Set up the UI language with the users' local UI culture. ///