mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Add plugin stub for notifying GUI language change
This commit is contained in:
parent
3ba2e8e376
commit
d7473db6af
2 changed files with 11 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
namespace PKHeX.Core;
|
namespace PKHeX.Core;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Plugin interface used by an editor to notify third-party code providers.
|
/// Plugin interface used by an editor to notify third-party code providers.
|
||||||
|
@ -26,6 +26,13 @@ public interface IPlugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void NotifySaveLoaded();
|
void NotifySaveLoaded();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Notifies the plugin that the display language has changed.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="language">Short code for language name</param>
|
||||||
|
/// <remarks>Useful to translate controls if any added.</remarks>
|
||||||
|
void NotifyDisplayLanguageChanged(string language) { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to load a file using the plugin.
|
/// Attempts to load a file using the plugin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -974,6 +974,9 @@ public partial class Main : Form
|
||||||
PKME_Tabs.PopulateFields(pk); // put data back in form
|
PKME_Tabs.PopulateFields(pk); // put data back in form
|
||||||
Text = GetProgramTitle(sav);
|
Text = GetProgramTitle(sav);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var plugin in Plugins)
|
||||||
|
plugin.NotifyDisplayLanguageChanged(lang);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue