mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
fix: restore Dalamud.Localization.Localize()
This commit is contained in:
parent
966e1f5dc9
commit
cd5235b088
1 changed files with 14 additions and 0 deletions
|
|
@ -51,6 +51,20 @@ namespace Dalamud
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event LocalizationChangedDelegate LocalizationChanged;
|
public event LocalizationChangedDelegate LocalizationChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key">The string key to be returned.</param>
|
||||||
|
/// <param name="fallBack">The fallback string, usually your source language.</param>
|
||||||
|
/// <returns>The localized string, fallback or string key if not found.</returns>
|
||||||
|
// 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());
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set up the UI language with the users' local UI culture.
|
/// Set up the UI language with the users' local UI culture.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue