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. ///