— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
RPG in a Box currently includes some basic localization support. This will allow you to provide multiple translations for your game's dialogue, messages, and other text.
In order to add support for multiple languages you will first need to create a spreadsheet containing any applicable text strings. Google Sheets is a great (and free) tool you can use to accomplish this. As shown below, the header row (starting in the second column) should contain the locale code for each language that your game will support. Each row after that should contain a unique ID to identify the string (all uppercase) followed by each translation of the string.
language1 | language2 | language3 | |
---|---|---|---|
KEY1 | string | string | string |
KEY2 | string | string | string |
KEY3 | string | string | string |
You can refer to Godot's list of locales for the locale codes that are supported. These are the codes that will be specified in the header row of your translations spreadsheet, for example “en” for English.
A simple example shown below contains English and French translations for the game title and some greeting dialogue.
Once you've populated your translations spreadsheet, save it as a .CSV (comma-separated values) file. You can then import it into your project using the Import Resources tool located on the main toolbar.
After you have imported your translations, you can view them by opening the Game Configuration dialog and clicking on the Translations tab.
Once you have imported the translations into our project, you can reference them within dialogue or message text by using the placeholder syntax shown below (specifically, the string's unique ID enclosed by percent symbols).
At game runtime, any occurrences of these placeholders will be replaced with the translated text string corresponding to the active language.
The table below lists all of the text strings that are currently built into RPG in a Box. If you'd like to override one of these values (for example, if you'd like the “New Game” menu button to display as “Start Game” instead), or to provide these values for an additional language, you can simply include rows in your translations spreadsheet with the appropriate IDs.
You can also include a row in your translations spreadsheet having an ID of “GAME_TITLE” if you'd like to provide alternate translations of the game's title for each of your supported languages.
en | fr | |
---|---|---|
NEW_GAME | New Game | Nouvelle partie |
CONTINUE | Continue | Continuer |
OPTIONS | Options | Options |
QUIT | Quit | Quitter |
QUIT_TO_TITLE | Quit to Title | Retour au titre |
LANGUAGE | Language | Langues |
DISPLAY_MODE | Display Mode | Mode d'affichage |
WINDOW_SIZE | Window Size | |
INVERT_MOUSE | Invert Mouse | Souris inversée |
KEYBOARD_LAYOUT | Keyboard Layout | Configuration Clavier |
BACK | Back | Retour |
FULLSCREEN | Fullscreen | Plein écran |
WINDOWED | Windowed | Fenêtré |
ON | On | On |
OFF | Off | Off |
RESUME | Resume | Reprendre |
SAVE_GAME | Save Game | Sauvegarder |
CREDITS | Credits | Crédits |
INVENTORY | Inventory | Inventaire |
REMAINING_USES | Remaining uses: | Utilisations restantes : |
UNLIMITED_USES | Unlimited uses | Utilisation illimitée |
RIGHT_CLICK_TO_USE | Right-click to use | (Clic Droit pour utiliser) |
ENTER_TO_USE | (ENTER to use) | (ENTRER pour utiliser) |
CONFIRM_QUIT_GAME | Are you sure you want to quit? | Etes-vous sûr de vouloir quitter ? |
LOAD_GAME | Load Game | Charger Partie |
GAME_SAVED | Game Saved | Partie Sauvegardée |
END_TURN | End Turn | Tour Final |
ENEMY_TURN | Enemy Turn | Tour Adverse |
ANTIALIASING | Antialiasing | Antialiasing |
MSAA_2X | MSAA 2x | MSAA 2x |
MSAA_4X | MSAA 4x | MSAA 4x |
MSAA_8X | MSAA 8x | MSAA 8x |
MSAA_16X | MSAA 16x | MSAA 16x |
YES | Yes | Oui |
NO | No | Non |