diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 01:06:35 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 01:06:35 -0400 |
commit | 12ffd9c334906e2256a1c32976b6a07f75027f25 (patch) | |
tree | 0e98bb070b3a002414cb3101470d1dfb2dad5b07 /src/StardewModdingAPI/Framework | |
parent | 01197b0eb1845251b12322ba1b9cf130cd2a9dc1 (diff) | |
download | SMAPI-12ffd9c334906e2256a1c32976b6a07f75027f25.tar.gz SMAPI-12ffd9c334906e2256a1c32976b6a07f75027f25.tar.bz2 SMAPI-12ffd9c334906e2256a1c32976b6a07f75027f25.zip |
add shortcut indexer to translation API (#296)
Diffstat (limited to 'src/StardewModdingAPI/Framework')
-rw-r--r-- | src/StardewModdingAPI/Framework/TranslationHelper.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Framework/TranslationHelper.cs b/src/StardewModdingAPI/Framework/TranslationHelper.cs index dece6214..c3104d1b 100644 --- a/src/StardewModdingAPI/Framework/TranslationHelper.cs +++ b/src/StardewModdingAPI/Framework/TranslationHelper.cs @@ -29,6 +29,10 @@ namespace StardewModdingAPI.Framework /// <summary>The game's current language code.</summary> 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 |