How to add Language option to YEP Option Core plugin
Here is a tutorial made by Alasthorn. Special thanks to Alasthorn for a great tutorial that will help YEP Option Core users.
Functions:,
Make Option Code,
this.addCommand(name, symbol, enabled, ext);
Draw Option Code,
var rect = this.itemRectForText(index); var statusWidth = this.statusWidth(); var titleWidth = rect.width - statusWidth; this.resetTextColor(); this.changePaintOpacity(this.isCommandEnabled(index)); this.drawOptionsName(index); var symbol = this.commandSymbol(index); var value = this.getConfigValue(symbol); var languages = ['FR', 'EN']; var languageNames = ['Français', 'English']; var langIndex = languages.indexOf(value); var status = languageNames[langIndex] || value; this.drawText(status, titleWidth, rect.y, statusWidth, 'center');
Process OK Code,
var index = this.index(); var symbol = this.commandSymbol(index); var value = this.getConfigValue(symbol); var languages = ['FR', 'EN']; var current = languages.indexOf(value); var next = (current + 1) % languages.length; this.changeValue(symbol, languages[next]); changeToLanguage(languages[next]);
Cursor Right Code,
var index = this.index(); var symbol = this.commandSymbol(index); var value = this.getConfigValue(symbol); var languages = ['FR', 'EN']; var current = languages.indexOf(value); var next = (current + 1) % languages.length; this.changeValue(symbol, languages[next]); changeToLanguage(languages[next]);
Cursor Left Code,
var index = this.index(); var symbol = this.commandSymbol(index); var value = this.getConfigValue(symbol); var languages = ['FR', 'EN']; var current = languages.indexOf(value); var next = (current - 1 + languages.length) % languages.length; this.changeValue(symbol, languages[next]); changeToLanguage(languages[next]);
Defaut Config Code,
ConfigManager[symbol] = 'FR';
Save Config Code,
config[symbol] = ConfigManager[symbol];
Load Config Code,
ConfigManager[symbol] = config[symbol] || 'FR';
Note: FR and EN are the symbols for my two languages in the game: French and English, but you can adapt them as you wish: example :
var languages = [‘FR’, ‘EN’, ‘JP’, ‘DE’]; var languageNames = [‘Français’, ‘English’, ‘Japanese’, ‘German’];
to be modified in:
Draw Option Code
Process OK Code
Cursor Right Code
Cursor Left Code
Get Non-Destructive Localization - Plugin for RPG Maker MV/MZ
Buy Now$9.99 USD or more
Non-Destructive Localization - Plugin for RPG Maker MV/MZ
Auto generate translation file and translate your game without replacing your in-editor text
Status | Released |
Category | Tool |
Author | Sang Hendrix |
Tags | auto, localization, non-destructive, plugin, RPG Maker, RPG Maker MV, RPG Maker MZ, translate |
More posts
- Version 1.5.8 - Backend Improvement3 days ago
- Ver 1.5.7 - New feature: Extract Map Display Name60 days ago
- Ver 1.5.6 - New feature: Localize Game Title75 days ago
- Ver 1.5.5 - Bug fix to Name Column MZ78 days ago
- Ver 1.5.4 - Bug fix: Languages not load on scene boot84 days ago
- Ver 1.5.3 - New feature: Localize Title Screen backgroundApr 28, 2025
- Ver 1.5.2 - States message now localizableApr 17, 2025
- Ver 1.5.1 - All message in database is now translatableApr 16, 2025
- Ver 1.5.0 - Turn-based %1 %2 stuff now translatableApr 16, 2025
Leave a comment
Log in with itch.io to leave a comment.