Spoiler: MODERATORS AND IAVRA(PLUGIN AUTHOR)
I have not made this plugin. This is a fusion of the two @Iavra plugins: LocalizationCore and LocalizationMenu.
I have made this when I was learning how to code and so I rewrite a little bit of this plugin in a way that I can understand it better.
I have fixed a bug that when having more than 3 languages, the options to select behave strangely and add a fix inside the plugin that the author himself had made. Also, add plugin commands.
If the Author or the moderators do not agree with this post, please don't approve it. As well I will remove it from Itch Io too.
I also made a demo of the plugin working and it will all be free for the public.
Author: Iavra
*No longer supported*
Introduction
This plugin is the merger of two plugins from the Iavra author: Iavra_Localization_Core and Iavra_Localization_Menu. I didn't change anything in the codes, I just changed the way it is written.
Three bugs were fixed, two by me and one by the author himself in the topic official.
There were also some changes to the help file.
Features
• Add as many languages as you want.
• Make translations using an external .json file and import it into the game.
• You can translate the entire database.
• You can also translate anything into the parameters of other plugins.
• Change the language through the menu or script calls.
• Works on Pc and Mobile.
How to use
• Setting the languages:
First, set your languages in the "Languages" parameter.
Then make the files .json (Must be saved in UTF-8) in your favorite text
editor and name them according to the parameter.
Example:
Parameter > en, ptbr, esp
Files > en.json, ptbr.json, esp.json
These files must be in the project's root folder.
The first language defined will be the default language.
• How translation works:
The plugin will replace an "escape code" that you use in the game for what matches it in the .json files.
Example:
Message box> # {Npc.01} or # {Npc01}
In the .json file for the languages you should put it like this:
"Npc": {
"01": "My name is Haroldo",
"02": "My name is Laura"
}
or
"Npc01": "My name is Haroldo"
You can repeat the same process in the database and parameters of other plugins.
You can also translate using arrays:
In .json:
"text": ["Text 1", "Text 2", "Text 3"]
This will generate escape codes> "text.0", "text.1" and "text.2"
Escape codes can also contain other escape codes within them:
{
"text": "Hi, my name is # {actor}",
"actor": "Harold"
}
* Do not use accents in the "escape code".
* To use the default escape codes of the message box (including other plugins):
Wrong > \ i [2]
Right > \\ i [2]
* To skip a line use \n, as the .json file by default does not support
line break.
The plugin offers the following script calls:
IAVRA.MasterLocalization.I18N.language; Returns the current language.
IAVRA.MasterLocalization.I18N.language = lang; Sets the current language to lang.
IAVRA.MasterLocalization.I18N.languages(); Returns a list of all available languages.
IAVRA.MasterLocalization.I18N.localize(text); Localizes the given text.
You can change the languages via menu > options, via script calls or with the plugin command:
SET_LANG [language]
Example:
SET_LANG en
*You can use this site to find and fix errors in .json files:
JSON Formatter & Validator
Format and validate JSON data so that it can easily be read by human beings.

jsonformatter.curiousconcept.com
Screenshots
Spoiler
Terms of Use
Free for commercial and non-commercial.
As long you credit Iavra.
Original thread.
Spoiler: IAVRA_MasterLocalization.js
Update Log
Version 1.0 - 04/10/2020
- Released!
本贴来自国际rpgmaker官方论坛作者:Eliaquim处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/iavra_masterlocalization.120038/