diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-08-25 21:54:00 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-08-25 21:54:00 -0400 |
commit | 211f89821e34bb55a6266384d9bac68ec0c64744 (patch) | |
tree | aa0d9915b01aad436ed6b1a2028602c048666457 /src/SMAPI/ITranslationHelper.cs | |
parent | 80d3dd1f786f7e5846f9adb7f7a4d82e5b9b92fd (diff) | |
parent | 31ac964a8b19623b0472931403a33d51db6fb271 (diff) | |
download | SMAPI-211f89821e34bb55a6266384d9bac68ec0c64744.tar.gz SMAPI-211f89821e34bb55a6266384d9bac68ec0c64744.tar.bz2 SMAPI-211f89821e34bb55a6266384d9bac68ec0c64744.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/ITranslationHelper.cs')
-rw-r--r-- | src/SMAPI/ITranslationHelper.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI/ITranslationHelper.cs b/src/SMAPI/ITranslationHelper.cs index c4b72444..b30d9b14 100644 --- a/src/SMAPI/ITranslationHelper.cs +++ b/src/SMAPI/ITranslationHelper.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using StardewValley; namespace StardewModdingAPI @@ -30,5 +30,10 @@ namespace StardewModdingAPI /// <param name="key">The translation key.</param> /// <param name="tokens">An object containing token key/value pairs. This can be an anonymous object (like <c>new { value = 42, name = "Cranberries" }</c>), a dictionary, or a class instance.</param> Translation Get(string key, object tokens); + + /// <summary>Get a translation in every locale for which it's defined.</summary> + /// <param name="key">The translation key.</param> + /// <param name="withFallback">Whether to add duplicate translations for locale fallback. For example, if a translation is defined in <c>default.json</c> but not <c>fr.json</c>, setting this to true will add a <c>fr</c> entry which duplicates the default text.</param> + IDictionary<string, Translation> GetInAllLocales(string key, bool withFallback = false); } } |