Translation / Multi-language
RPG Wizard G provides multi-language support out of the box. Japanese and English are provided as samples, and users can add any additional language.
This chapter explains how to make your in-game text (character names, item names, dialogue, etc.) support multiple languages.
This is different from the editor UI language
This chapter is about the translation dictionary used by the game (runtime) that users build. The display language of the add-on's editor screens (tab names, labels, etc.) follows the Godot editor's own "Editor Language" setting.
If your editor UI appears in the wrong language, see Installation - Problem 5.
Translation Overview
How it works
Translation in RPG Wizard G flows as follows.
- The user writes the source text to translate (typically Japanese) in character names, item names, and dialogue
- On the Translation tab, pressing "Auto-add untranslated keys" automatically extracts every user-defined text in the project as translation keys
- On the Translation tab, the user adds a language (e.g. English) and enters a translation for each key
- Saving writes the data to the translation data file (
data/localized/translation.json) - The translation dictionary is automatically loaded at game start
- The player can switch languages from the in-game settings screen
Data subject to translation
The following data is translation-eligible.
| Category | Target fields |
|---|---|
| Char | Name / description |
| Enemy | Name / description |
| Class | Name |
| Item | Name / description |
| Attach | Name / description |
| State | Name |
| Parameter | Name |
| Item type | Name |
| Attach type | Name |
| Map | Name |
| System settings | MENU button labels |
| Event content | Body of Show Text / Add Choice / Add Button, and title of Show Text Input / Show Number Input |
Editing Translations in the Translation Tab
Translation data is edited in the Translation tab (at the top of the editor screen, just before the System tab).
Enabling the translation feature
First, enable translation via the Translation on/off checkbox in the "Translation" section of the System tab.
- When turned ON: If the translation data file exists, it is used as-is. If it does not exist, untranslated keys are auto-collected and a new file is created
- When turned OFF: The translation data file is renamed with a backup extension and set aside (not deleted; recoverable later)
Translation tab UI
The Translation tab has two panes, left and right.
Left pane: Translation key list
- Language Management button: Add or remove languages
- Add Key / Remove Key buttons: Add or remove translation keys individually
- Auto-add untranslated keys button: Scans every user-defined text in the project and automatically adds unregistered keys to the dictionary
- Search field: Filter keys by keyword (case-insensitive partial match)
- Filter: Switch display among All / Untranslated only / Translated only (three choices)
- Key list: Untranslated keys are shown in red
- Save button: Writes edits to the translation data file
Right pane: Translation details
Enter translations for the key selected on the left, per language.
- Key: The currently selected key name (editable to rename)
- Per-language TextEdit: Multi-line translation input per supported language
Adding a language
- Click the Language Management button
- Enter a language code in the "Add" section (e.g.
frfor French,zh_CNfor Simplified Chinese) - Click the Add button
- The new language is added to the supported languages list
- Close with Close
- A new TextEdit for that language appears in the Translation Details pane; enter the translations for each key
Language code format: ^[a-z]{2}(_[A-Z]{2})?$ (ISO 639-1 two letters + optional _ + ISO 3166-1 two letters)
| Language | Example code |
|---|---|
| Japanese | ja |
| English | en |
| French | fr |
| Chinese (Simplified) | zh_CN |
| Chinese (Traditional) | zh_TW |
| Korean | ko |
| Spanish | es |
Removing a language
- Click the Language Management button
- In the "Remove" section, select the language to remove in the OptionButton
- Click the Delete button
WARNING
- English (en) is a reserved language and cannot be removed (editor's standard fallback language)
- Japanese (ja) can be removed
- You cannot remove the last remaining language
Auto-adding untranslated keys
Pressing the "Auto-add untranslated keys" button scans everything below and automatically adds keys that are not yet registered in the dictionary.
nameandcommentof all characters / enemies / items / attaches / classes / states / parameters / types / mapstextof Show Text / Add Choice / Add Button, andtitleof Show Text Input / Show Number Input in every event- MENU button labels in system settings (
menu_text) - System UI strings used internally by this tool ("Save", "Load", "Settings", etc.; 24 total)
- Translation keys used internally by this tool ("Fight", "Escape", "Cost", etc.; auto-extracted)
Existing translations are protected
"Auto-add untranslated keys" does not overwrite existing translations. Languages that already have a translation are left alone; only untranslated languages are added with an empty string.
Translation Examples
Translating a character name
If you write カナミ as name in the Char tab, register it on the Translation tab like this.
Key: カナミ
en: Kanami
ja: カナミSwitching the in-game language to English will automatically show the character name as Kanami.
Translating a Show Text (dialogue)
Suppose you wrote this in the text of a Show Text event content.
{@char.MEM_0}: こんにちは、旅の勇者よ。At runtime, {@char.MEM_0} is replaced with the character's name (e.g. カナミ), so the final, expanded string becomes the translation key.
Key: カナミ: こんにちは、旅の勇者よ。
en: Kanami: Hello, brave traveler.
ja: カナミ: こんにちは、旅の勇者よ。Translating text that contains line breaks (\n)
Text that contains line breaks is included in the translation key as-is.
Key: 1 行目\n2 行目
en: Line 1\nLine 2
ja: 1 行目\n2 行目Combined with variable expansion
When "Show Text" and similar event content uses variables (such as {var_1}), the variable values are substituted first at runtime, then the translation dictionary is consulted. If the variable's value is dynamic (such as player input), there will be no dictionary hit, and the original string is displayed as-is. For fixed values (for example, the variable always contains 炎), register the fully expanded string (one that contains 炎) as the translation key.
Related: Text Notation explains notations such as {var_1} and {@char.KEY}.
In-game Language Switching
How players change languages
Players can change the language on the in-game Settings screen (In-game menu → Settings). Only languages with at least one translation entry appear as choices.
Languages with zero translations are not shown as choices (important)
Simply adding a language on the Translation tab does not make it appear in the in-game Settings screen. It only shows up after you enter at least one translation for that language and save.
This is by design: "only expose languages whose translation implementation is complete to the user (player)." Choosing an empty language would still display English, so we restrict the choices to meaningful ones.
Example: Add French (fr) via Language Management → save without entering any translations → fr does not appear in the in-game Settings language choices. Enter even one translation and save again, and fr appears.
Behavior when a key is missing from the dictionary
At runtime, if the translation dictionary has no entry for a key, the original string is displayed as-is (no error).
As a result:
- Even with missing translations, the UI never breaks (Japanese is displayed as-is)
- The game is still playable with no translation dictionary
- When switching languages, missing keys are displayed in the source language
Constraints and Caveats
No duplicate translation keys
Using the same source text with two different meanings causes a conflict in the dictionary.
Example: If "Save" is used both as a system label and in user-defined text, only one meaning can be translated.
Fix: Use different strings for different purposes, or include context in the key (such as Save and Save (character name)).
Translation data is provided by the user
This tool includes some translations in the sample data, but translating all text in the RPG the user builds is the user's responsibility.
Finding missing translations
Press "Auto-add untranslated keys" to auto-extract untranslated keys, then set the filter to "Untranslated only" to see missing translations at a glance.
Recommended language-addition workflow
- First, complete the game in Japanese (or English) (write all character names, item names, and dialogue)
- On the Translation tab, press "Auto-add untranslated keys" to collect every key
- In Language Management, add the target language (e.g. English)
- Enter translations for each key in the Translation Details pane
- Save
- Launch the game → switch languages on the Settings screen and verify
FAQ
I can't find the Translation tab
Cause: The "Translation on/off" is off.
Fix: Turn the checkbox on in the "Translation" section of the System tab. If no translation data file exists, untranslated keys are auto-collected and a new file is created.
I turned the checkbox off while editing on the Translation tab and the dictionary disappeared
Actually: The translation data file is set aside with a .backup extension. Turning the checkbox on again restores it (it is not deleted).
I added a language, but it does not appear in the in-game Settings screen
Cause: That language has zero translations entered.
Fix: Enter at least one translation for that language in the Translation Details pane and save.
I entered a translation for the "カナミ" key, but the character name is not translated in-game
Possible causes:
- The language has not been switched → change the language on the in-game Settings screen
- The key does not match exactly → check that full-width / half-width, whitespace, and line breaks match the source text
- You did not save the Translation tab → press the Save button
How are keys containing escapes like \n handled?
Supported: \n (line break), \t (tab), \\ (backslash), and \" (double quote) are restored via Common.unescape_sp_chars, same as escapes like [LF]. Register them in the translation dictionary including the escape characters.
Related: Text Notation
How complete is the translation of the sample data?
All keys in the bundled sample data (about 275 keys) are translated in two languages, Japanese and English. Additional languages can be added by the user as needed.
Can I move translations entered on the Translation tab to another project?
Yes: Copy the translation data file (data/localized/translation.json) to the same location in the other project and it will work as-is.
