using System.Collections.Generic;
using StardewValley;
namespace StardewModdingAPI
{
/// Provides translations stored in the mod's i18n folder, with one file per locale (like en.json) containing a flat key => value structure. Translations are fetched with locale fallback, so missing translations are filled in from broader locales (like pt-BR.json < pt.json < default.json).
public interface ITranslationHelper
{
/*********
** Accessors
*********/
/// The current locale.
string Locale { get; }
/// The game's current language code.
LocalizedContentManager.LanguageCode LocaleEnum { get; }
/*********
** Public methods
*********/
/// Get all translations for the current locale.
IDictionary GetTranslations();
/// Get a translation for the current locale.
/// The translation key.
Translation Get(string key);
/// Get a translation for the current locale.
/// The translation key.
/// An object containing token key/value pairs. This can be an anonymous object (like new { value = 42, name = "Cranberries" }), a dictionary, or a class instance.
Translation Get(string key, object tokens);
}
}