-
-
Notifications
You must be signed in to change notification settings - Fork 6
Localization
Both Launcher and Admin Tool are localizable.
You just need to create a new class that implements the IUpdaterLocalizedMessages
interface. You can find the sample for English on MHLab/Patch/Launcher/Scripts/Localization/EnglishUpdaterLocalizedMessages.cs
.
When you implemented your own localized class, you can inject it into the UpdatingContext object:
_context = new UpdatingContext(settings, progress);
_context.LocalizedMessages = new YourAwesomeLanguageUpdaterLocalizedMessages();
You can take a look at it in Launcher.cs
script in Initialize
method.
You just need to create a new class that implements the IAdminLocalizedMessages
interface. You can find the sample for English on MHLab/Patch/Admin/Editor/Localization/EnglishAdminLocalizedMessages.cs
.
When you implemented your own localized class, you can inject it into context objects:
_context = new AdminBuildContext(settings, progress);
// or new AdminPatchContext(settings, progress);
// or new AdminPatcherUpdateContext(settings, progress);
_context.LocalizedMessages = new YourAwesomeLanguageAdminLocalizedMessages();
You can take a look at it in AdminWindow.cs
script in InitializeSettings
method.
You can contribute to localize PATCH in your language: I exposed interfaces and other localization files in this folder. Check it out and make a pull request!