using System;
using StardewModdingAPI.Framework;
namespace StardewModdingAPI.Events
{
/// Events raised when the game loads content.
public static class ContentEvents
{
/*********
** Events
*********/
/// Raised after the content language changes.
public static event EventHandler> AfterLocaleChanged;
/*********
** Internal methods
*********/
/// Raise an event.
/// Encapsulates monitoring and logging.
/// The previous locale.
/// The current locale.
internal static void InvokeAfterLocaleChanged(IMonitor monitor, string oldLocale, string newLocale)
{
monitor.SafelyRaiseGenericEvent($"{nameof(ContentEvents)}.{nameof(ContentEvents.AfterLocaleChanged)}", ContentEvents.AfterLocaleChanged?.GetInvocationList(), null, new EventArgsValueChanged(oldLocale, newLocale));
}
}
}