mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 20:13:06 +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>
|
||||
/// Plugin interface used by an editor to notify third-party code providers.
|
||||
|
@ -26,6 +26,13 @@ public interface IPlugin
|
|||
/// </summary>
|
||||
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>
|
||||
/// Attempts to load a file using the plugin.
|
||||
/// </summary>
|
||||
|
|
|
@ -974,6 +974,9 @@ public partial class Main : Form
|
|||
PKME_Tabs.PopulateFields(pk); // put data back in form
|
||||
Text = GetProgramTitle(sav);
|
||||
}
|
||||
|
||||
foreach (var plugin in Plugins)
|
||||
plugin.NotifyDisplayLanguageChanged(lang);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
Loading…
Reference in a new issue