Phileas's Language Localisation
Plugin name: Phileas's Language LocalisationAuthor: Phileas
Version: 1.3.3 for MZ
Release date:
1.0.0 - 2024.November.09
1.1.0 - 2024.November.16
1.2.0 - 2024.November.29
1.2.3 - 2025.January.04
1.2.4 - 2025.January.12
1.2.5 - 2025.January.19
1.2.6 - 2025.January.20
1.2.7 - 2025.January.26
1.3.0 - 2025.February.15
1.3.1 - 2025.March.15
1.3.2 - 2025.April.06
1.3.3 - 2025.May.03
Plugin description:
The plugin allows to translate all the text in the game into many languages.
To support custom fonts, install the Phileas's Custom Fonts plugin.
Use the Phileas's Text Wrap plugin to automatically move words to a new line.
If you are using the Phileas's Options Manager plugin, place it above the real plugin in the Plugin Manager menu.
INSTALLATION
Spoiler: INSTALLATIONFor the plugin to work, you need to install Phileas's File Manager.
If you need commands to export and import language data to XLSX, then install the XLSX library.
You can delete the library file before deploying the game to save space.
MANUAL
Spoiler: MANUAL1. Configure the "Languages" parameter. Set the language codes. It is important that they are unique.
2. Create a "languages" folder in the root of the project.
3. In the "languages" folder, create language folders, name each folder must match the language code.
4. Create a "main.json" file in each language folder. It will store the root properties of the language dictionary. There must be an object (curly brackets) at the root of this file.
5. You can add other localization files. It is important that the list of files in each language data folder matches. You can create subfolders of any level.
6. At the root of the file should be either an object (curly brackets) or an array (square brackets).
7. Fill in the localization files with text. The structures of all objects must match, only the final string values can differ.
8. To use localized text in the game, type a line like this in the right place:
${<text code>}
<text code>
The text code should lead to the value in the localization files.
9. The properties specified in "languages/<text code>/main.json", will be at the root of the localization dictionary. For example, if main is set like this:
JSON:
{
"yes": "Yes"
}
To use this value, type this:
${yes}
10. If the property is specified in another file, then you need to specify the path to the file before its name. For example, if you have a file with the path "../languages/<text code>/chapter_1/dialogues.json" and such a structure:
JSON:
{
"point_0": "Реплика"
}
To use this value, type this:
${chapter_1.dialogues.point_0}
11. In addition to objects, you can use arrays. Let's change the example from point 9:
JSON:
{
"point_0":
[
"Hello",
"Bye"
]
}
To use these values, type this:
${chapter_1.dialogues.point_0}
${chapter_1.dialogues.point_0}
12. The array can be located right at the root of the localization file (except for the "main.json"). Let's change the example from paragraph 10:
JSON:
[
[
"Hello",
"Bye"
]
]
To use these values, type this:
${chapter_1.dialogues}
${chapter_1.dialogues}
13. You can optionally nest objects and arrays into each other. The nesting level is unlimited!
14. You can also use the translated text inside the translated text:
JSON:
"first_text": "Simple example",
"second_text": "The first text is ${first_text}."
15. To use control symbols to set text, use a variable,
icon, and more, add a second slash:
\C -> \\C OR \V -> \\V OR \. -> \\.
16. The plugin provides the following commands:
[*]"Set the language" - changes the current language localization.
LOCALIZED RESOURCES (MEDIA)
You can use different files (audio, images, video) for each language.
The function works for all types of images (animations, pictures, tilesets and others), all types of audio (BGM, BGS, ME, SE) and video (movies).
Manual:
[*]The language specified first in the "Languages" parameter is considered the default language. For example, the default language may be with the code "en".
[*]Place the media file to the directory you need. This should be a file for the default language. For example, you can execute an image in the "img/pictures" directory. Let it be "a.png":
"img/pictures/a.png"
[*]If you want another image for a different language to appear instead of this image, create a folder in the same directory. Its name must match the code of the desired language. Example:
"img/pictures/ru".
[*]In this new directory, create a media file with the same name and relative path:
"img/pictures/ru/a.png".
[*]In the "Show Picture" command, select the file for the default language. If a second language is enabled in the game settings, a picture for this language will appear.
[*]You don't have to create a separate file for each language. If a file for any language is not found, the file for the default language will be used.
[*]You can use subfolders. Then the relative paths must match. Example:
"img/pictures/sub_folder/b.png"
"img/pictures/ru/sub_folder/b.png"
COMPATIBILITY WITH OTHER PLUGINS
The plugin is compatible with "Phileas's Text Wrap".
Place this plugin under "Phileas's Text Wrap" in the Plugin Manager.
The plugin is compatible with "TAA_BookMenu".
Place this plugin under "TAA_BookMenu" in the Plugin Manager.
If you are using "Phileas's Language Localization", "Phileas's Text Wrap" and "TAA_BookMenu" at the same time, arrange them exactly in this order in the Plugin Manager:
[*]TAA_BookMenu
[*]Phileas_TextWrap
[*]Phileas_LanguageLocalisation
How it looks like:
Spoiler: How it looks like
DEMO PROJECT
Download
Launch online
Code
License
This plugin is released under MIT license.
This means that you can freely use the plugin in non-commercial and commercial games and even edit it.
But be sure to include me in the credits!
Compatibility:
If there are any problems, write to me.
本贴来自国际rpgmaker官方论坛作者:Phileas处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/phileass-language-localisation.173148/
页:
[1]