设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
返回列表
+ 发新帖
查看: 226|回复: 0

[转载发布] Iavra_MasterLocalization

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    昨天 03:27
  • 签到天数: 222 天

    连续签到: 1 天

    [LV.7]常住居民III

    9102

    主题

    893

    回帖

    7万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    64916
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    74941

    灌水之王

    发表于 2026-7-27 20:26:05 | 显示全部楼层 |阅读模式
    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
                    JavaScript:       



    ​

    Update Log
    Version 1.0 - 04/10/2020
    - Released!


    本贴来自国际rpgmaker官方论坛作者:Eliaquim处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/iavra_masterlocalization.120038/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x

    帖子地址: 

    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-10-22 08:03 , Processed in 0.093984 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表