using System;
using LanguageCode = StardewValley.LocalizedContentManager.LanguageCode;
namespace StardewModdingAPI.Events
{
/// Event arguments for an event.
public class LocaleChangedEventArgs : EventArgs
{
/*********
** Accessors
*********/
/// The previous language enum value.
/// For a custom language, this is always .
public LanguageCode OldLanguage { get; }
/// The previous locale code.
/// This is the locale code as it appears in asset names, like fr-FR in Maps/springobjects.fr-FR. The locale code for English is an empty string.
public string OldLocale { get; }
/// The new language enum value.
///
public LanguageCode NewLanguage { get; }
/// The new locale code.
///
public string NewLocale { get; }
/*********
** Public methods
*********/
/// Construct an instance.
/// The previous language enum value.
/// The previous locale code.
/// The new language enum value.
/// The new locale code.
internal LocaleChangedEventArgs(LanguageCode oldLanguage, string oldLocale, LanguageCode newLanguage, string newLocale)
{
this.OldLanguage = oldLanguage;
this.OldLocale = oldLocale;
this.NewLanguage = newLanguage;
this.NewLocale = newLocale;
}
}
}