Translation Engine – MV Plugin

      18 Comments on Translation Engine – MV Plugin

This plugin does not have any dependencies.

This plugin provides game developers with tools necessary to easily and effectively translate and localize all the text within their game. This is through both an in-game tool that can be used while playtesting and a powerful notetag system for translating database inputs.


Look at the code or download the Plugin:


=======================================================================
Translation Engine
SumRndmDde
=======================================================================
This plugin provides game developers with tools necessary to easily and
effectively translate and localize all the text within their game. This is
through both an in-game tool that can be used while playtesting and a
powerful notetag system for translating database inputs.

=======================================================================
Installing the Plugin
=======================================================================
Here’s a quick overview on how to properly install the plugin:

1) Place this plugin at the bottom of your plugin list!

2) Fill out the [Languages] plugin parameter with all the languages the
game will be translated to.

3) Set the [Source Language Name] plugin parameter to the name of the
language used by the text by default.

4) Finally, set [Provide Option?] ON or OFF based on whether or not you
wish to provide the player with the option to change the language in
the options menu.

=======================================================================
How to open the Translation App
=======================================================================
While playtesting, press [CTRL + T] on Windows or [CMD + T] on Mac in
order to open the “Translation App”. This is an app/editor that allows
one to set up translations while playing the game.

Once the app is open, it will act as a separate window from the game
window.

Here are a few rules that apply:

1) While the app is open, the game will only show the default text. You
may not view translations unless the tool is closed. This is to help
avoid confusion while editing since changes will not be applied until
the app window is closed.

2) The game cannot completely shut down unless both the game window and the
editor window are both closed. If, for some reason, you cannot playtest
your game, be sure the Translation App is closed!

3) The app will save its position when it is closed. If you open it again,
it will appear where it left off! However, once you close or reset the
game, its position will also be reset.

=======================================================================
How to use the Translation App
=======================================================================
To start translating, first select the language you wish to translate to
in the top-right corner of the app. Next, select what aspect of your game
you wish to translate. All four choices appear as tabs you may select from
the top of the editor. They are:

~ Messages
~ Commands
~ Terms
~ Custom Translations

Here’s an explanation of each one:

=========================
Messages
=========================
This allows developers to provide translations for text within “Show Text”
events and “Show Scrolling Text” events. While the “Messages” tab is open,
the Original input will update itself to the current text displayed within
one of the aforementioned events. If neither of those events are active,
the input will remain blank.

While Original input box has text in it, one may create a translation for
the displayed text in the Translation input box. Simply type the text in
and it will save automatically!

Keep in mind the translations should include the desired text codes!

Also, this mode works great with the Event “Test” feature!

=========================
Commands
=========================
One may provide translations for any command windows using the “Commands”
tab. While this tab is open, all one must do is have an active cursor on
a command window, and the Original input will update itself. Insert a
corresponding translation into the Translation input to translate the
command!

Some windows that fall under the category of “command windows” include:

* The title screen command window
* The menu command window
* Command menus in other scenes
* The options window
* The game end window
* Event choice windows

This, of course, will also work with command windows added through
external plugins. Don’t be afraid to experiment!

=========================
Terms
=========================
This section allows developers to translate the terms and messages from
within their project’s Database’s Terms tab. All the Base Statuses,
Parameters, and Messages can be translated here. First, select the “Term”
from the dropdown list. Next, input a translation based upon the provided
Original input that contains the current text for that term.

Similar to the previous tabs, once you insert the text into the Translation
box, it will immediately be saved!

When one begins his or her translation process, it is recommended he or
she starts the process here. This tab provides the capability to make a
large number of helpful base translations!

=========================
Custom Translations
=========================
Custom translations allow for developers to set a word to phrase to
specifically translate into another. This is primarily used to translate
text that cannot be translated through any of the other mediums provided
through this plugin. Use this as a last resort for anything you cannot
translate normally!

In order to add a translation, simply fill out both the “Original” and
“Translation” inputs, then press the “Add Translation” button. This will
add the pair to a list of custom translations displayed on the lower-half
of the page.

In order to delete a translation, fill out the “Original” input with the
original text for that translation, then press the “Delete Translation”
button. This will remove that translation pair from both the list and the
game itself.

=========================
RegExp Translations
=========================
Custom translations can also use Regular Expressions. As opposed to the
normal custom translations which require exact matching in order to work,
Regular Expressions can allow for more dynamic checks and replacements from
within larger bodies of text.

In order to setup a Regular Expression, simply set the Original input to
have a Regular Expression using the typical JavaScript format:

/expression/flags

For example:

/Harold/ig

This example will check all texts for this match and apply a replacement
in order to replace this with the text defined in the Translation input.

=======================================================================
Translating the Database
=======================================================================
The second part of this plugin revolves around translating Database inputs
by using a notetag setup to translate specific fields. This can be done
with Actors, Classes, Skills, Items, Weapons, Armors, Enemies, States, and
Tilesets.

To do this, use the following notetag structure:

[PROP]:VAL
[PROP]:VAL
</LANGUAGE Translation>

[LANGUAGE] => The name of the language this is a translation for.
[PROP] => A field name for this data object.
[VAL] => The translated value for that data object’s field.

=========================
Example
=========================
This may appear to be a little confusing, but here is an example that one
may use to translate an Actor’s fields:

<Spanish Translation>
[name]:Haroldo
[nickname]:Harldy
[profile]:Este es el héroe del juego.
Le gusta caminar por la playa y jugar juegos.
</Spanish Translation>

This means, when the language is set to Spanish, this Actor will have the
following changes:

Name will be set to “Haroldo”.
Nickname will be set to “Harldy”.
Profile will be set to “Este es el héroe del juego.
Le gusta caminar por la playa y jugar juegos.”

=========================
All Common Fields
=========================
Here is a list of all the common field names you may wish to use
corresponding to each Database section:

[Actors]
<LANGUAGE Translation>
[name]:
[profile]:
[nickname]:
</LANGUAGE Translation>

[Classes]
<LANGUAGE Translation>
[name]:
</LANGUAGE Translation>

[Skills]
<LANGUAGE Translation>
[name]:
[description]:
[message1]:
[message2]:
</LANGUAGE Translation>

[Items, Weapons, Armors]
<LANGUAGE Translation>
[name]:
[description]:
</LANGUAGE Translation>

[Enemies]
<LANGUAGE Translation>
[name]:
</LANGUAGE Translation>

[States]
<LANGUAGE Translation>
[name]:
[message1]:
[message2]:
[message3]:
[message4]:
</LANGUAGE Translation>

[Tilesets]
<LANGUAGE Translation>
[name]:
</LANGUAGE Translation>

=======================================================================
Different Images Based on Language
=======================================================================
One may load alternative images based on the game’s language. To do this,
one must use the following format for the image file name:

IMAGENAME_[LANGUAGE]

To allow the plugin to recognize that an image can be translated, first
set the original image’s file name to:

IMAGENAME_[Original]

Then set up names for all your alternative images:

IMAGENAME_[Spanish] IMAGENAME_[Portuguese]

Be sure to set up images for all languages in your game!

=======================================================================
Plugin Commands
=======================================================================
In order to force the game to use a specific language, the following
plugin command must be invoked in an event. This can be different for
every game file.

SetTranslation LANGUAGE

For example:

SetTranslation Spanish

=======================================================================
Once a language is forced, it cannot be changed in the options menu.
In order to remove a forced translation, use the plugin command:

RevertTranslation

=======================================================================
Checking Current Language
=======================================================================
In order to change events based on the current language, the following
script condition needs to be used:

ConfigManager.getLanguage() === “LANGUAGE”

For example:

ConfigManager.getLanguage() === “Spanish”

=======================================================================
End of Help Section
=======================================================================


Screenshot:

18 thoughts on “Translation Engine – MV Plugin

  1. Edson Okamoto

    I’ve read in forum that it doesn’t work in Android (json is not found and translation is not recognized), is it right?

    Reply
    1. TheDiv

      It happens that I am making an android game and I have tried many things. Even though I have not tested this plugin yet, I have seen that error you mention in many plugins that add .js or .json content.

      I think I have the idea of how to fix it:

      When using this plugin the program will create a file called “Translations.json” in the “data” folder, this file is external to rpg maker and it is not counted when it is “explored in android”, so I think (I don’t know sincerely ) that when the project is exported this file “Translations.json” is excluded.

      The solution is to manually copy the “Translations.json” file into our exported “www / data” folder.

      Or so I think, I will confirm it in a few days (or weeks).

      Reply
      1. Zenrei

        I also want to know if someone has tested this. I’m in the middle of making a demo and if this is not possible then I don’t think I can use this for my game, because a translation tool is EXTREMELY important for what I’m working on.

        If it isn’t too much trouble, it would be great is if the plugin was updated in a way that saved and referenced a Translation.json in the project folder so it would workaround this problem altogether.

        Reply
  2. Suu

    Love this plugin so much – you did a great job there 🙂
    The only thing I’m missing is that I could also translate the “Gold” (cause with the custom section it doesnt translate it in the menu / battle screen). Or did I miss something?

    Reply
  3. Taishu

    Hello!
    Thank you so much for this amazing script! You’re a lifesaver.
    I’ve run into a small problem that I already fixed but would like to report:
    So, if your source language is not English and even if English is not on your list of languages, it continues to appear in the Options menu, but it’ll not appear in the CTRL+T menu. Then, if you do include English, it’ll appear twice in the Options menu, but only once in the CTRL+T menu.
    I’m a bit of a programmer too, so I made a slight alteration to the script:
    > On the line 1767, I changed the ‘English’ to ‘Default’, so it’ll make more sense to the average player.
    So effectively, the languages they’ll see are: “Default”(which in my case is Portuguese) and “English”.

    Reply
  4. dum

    Hey, Thank you this is really useful. However, I can’t get the command ‘SetTranslation LANGUAGE’ to work. I’ve tried over and over in different ways but it just doesn’t seem to work. Maybe I’m missing something? Can you please check it?

    Reply
  5. Pingback: Comment traduire une fiction interactive ? – Fiction-interactive.fr

  6. Lorenzo Rossetti

    Hi SRDude, I love this plugin and it is very usefull as well!
    But today I found an issue…
    So far everything was fine, but today I noticed that the Notetag Structure for Enemies, Weapons, Skills etc. doesn’t work anymore…
    I don’t know why, it worked so good until yesterday. What could have happened? I haven’t even changed anything in the code!

    Reply
  7. Kiki McCloud

    Hello there!
    I have a problem with your plugin…
    I started a game some years ago and started translating it with your great plugin.
    Now i want to wörk at this game again, but…
    I have the full version of the RPG maker MV from STEAM (version 1.6.2) and now I can’t open the plugin anymore.
    I open the game in the test-mode but… The Plugin window didn’t open when I press Crtrl +T…
    Any ideas what this causes and what I can do?

    Reply
  8. GingerSun Games

    hy i want to ask some of question.
    1. How to make this translation engine work correctly with Galv Quest Log. Because inside them using data.txt. and than after i copied all of them with symbol and than after i check almostly inside them cant translate it. ?

    2. and than i create choice language in first launch in new game. after player decided to change language in second option and that restart the game he cant change again into original
    I create Plugin Command SetTranslation , my question how to change back into source language. My Source language its English. After i try With SetTranslation Original or SetTranslation English in plugin command it doent work to bring back source language. But its work only in option menu.

    thanks if u response it

    Reply
  9. OtroNombreRaro

    I’m using it to translate some free games that are out there. Unfortunately I noticed a small bug if you open the translator window too quickly. If you open the translator window before it fully loads the game, it crashes generating an error in the game and converting everything written in the translation file to “null”. It was a bad day for me.
    PD:For people who have problems translating some yanfly plugins, use the derivation with variable = text. in the message of the yanfly plugin use \V[number] , if it is in the translated language the variable = text must be the translated one, if it is in the original language the variable must be in the original language

    Reply
  10. Matthew

    Does this translation plugin have access to game text created by other plugins, or only from the main game? For example, I am using a plugin that allows the player to quit from the main menu, which is very common. Can this plugin see the word “Quit” in the main menu? Thanks.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *