add shortcut indexer to translation API (#296)
This commit is contained in:
parent
01197b0eb1
commit
12ffd9c334
|
@ -29,6 +29,10 @@ namespace StardewModdingAPI.Framework
|
||||||
/// <summary>The game's current language code.</summary>
|
/// <summary>The game's current language code.</summary>
|
||||||
public LocalizedContentManager.LanguageCode LocaleEnum { get; private set; }
|
public LocalizedContentManager.LanguageCode LocaleEnum { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>Get a translation for the current locale. This is a convenience shortcut for <see cref="ITranslationHelper.Translate"/>.</summary>
|
||||||
|
/// <param name="key">The translation key.</param>
|
||||||
|
public Translation this[string key] => this.Translate(key);
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
|
|
|
@ -15,6 +15,10 @@ namespace StardewModdingAPI
|
||||||
/// <summary>The game's current language code.</summary>
|
/// <summary>The game's current language code.</summary>
|
||||||
LocalizedContentManager.LanguageCode LocaleEnum { get; }
|
LocalizedContentManager.LanguageCode LocaleEnum { get; }
|
||||||
|
|
||||||
|
/// <summary>Get a translation for the current locale. This is a convenience shortcut for <see cref="Translate"/>.</summary>
|
||||||
|
/// <param name="key">The translation key.</param>
|
||||||
|
Translation this[string key] { get; }
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
|
|
Loading…
Reference in New Issue