The RPG Maker MZ i18n Plugin is a localization tool that allows you to configure multiple languages for your game. This plugin provides an easy way to switch between languages and ensures all language files are synchronized with the default language file.
- Set a default language for your game.
- Automatically create language files and folders.
- Sync language files to ensure all keys are present.
- Update in-game menus and settings to reflect the selected language.
- Allow players to change languages using directional keys.
- Optionally add a language option to the game settings menu.
-
Download the Plugin:
- Download the
i18n.js
file from this repository.
- Download the
-
Add the Plugin to Your Project:
- Copy the
i18n.js
file into your project'splugins
folder.
- Copy the
-
Create the Language Files:
- When the plugin is first loaded, it will create a default
en.json
file in thedata/i18n/
directory. This file contains the default language keys.
- When the plugin is first loaded, it will create a default
-
Add the Plugin in RPG Maker MZ:
- Open your RPG Maker MZ project.
- Go to the "Plugin Manager."
- Click on an empty row, and add the
i18n.js
plugin. - Set the "Default Language Code" parameter to your desired default language (e.g.,
en
for English,pt
for Portuguese). - Set the "Add Language Menu" parameter to
true
if you want to add a language option to the game settings menu.
-
Creating Language Files:
- The plugin will create a default
en.json
file with the following structure:{ "i18n-code": "en", "i18n-name": "English", "language": "Language", "start-game": "Start Game", "options": "Options", "exit": "Exit" }
- You can create additional language files (e.g.,
pt.json
,jp.json
) in the same folder with the appropriate translations.
- The plugin will create a default
-
Syncing Language Files:
- When the game starts, the plugin will check all language files to ensure they have the same keys as the default language file. Missing keys will be added automatically.
-
Changing Language In-Game:
- If "Add Language Menu" is set to
true
, players can select the language in the options menu using the directional keys. - The language name will be displayed using the
i18n-name
key from the language files.
- If "Add Language Menu" is set to
-
Localizing Texts:
- The plugin will automatically update the main menu, options menu, and other game texts to use the localized text based on the selected language.
- Use localization keys in your texts, like
${start-game}
, and they will be replaced with the appropriate translation.
Here is an example of how to use the plugin:
- Set the default language to English (
en
). - Create additional language files (
pt.json
,jp.json
) with translations. - Players can change the language in the options menu (if enabled), and the game will update all texts to the selected language.
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or improvements.
If you have any questions or need further assistance, please contact me at [mano.afonso93@gmail.com].
This project is licensed under the Creative Commons Attribution 4.0 International License. You are free to share, adapt, and use this project for both commercial and non-commercial purposes as long as you provide appropriate credit to the author.
See the LICENSE file for more details.