Candy Logo Copyright © 2025-2026 Candy Arts

Translating UI Texts
The texts that choice menus and Input scenes display are translated through localization tables, in the User_Data/Localization_Tables folder. A Dialogue writes these texts once, in the Default language. When a menu or Input scene displays a text, it looks the text up in the matching table and displays the translation for the Engine's current language. Localization Tables Each localization table is a dictionary in a script of its own. Each key is a text as written in your Dialogues, and contains its translation in each language:
var choice_button_labels = { "Attack": { "French": "Attaquer", "Japanese": "攻撃", }, "Run away": { "French": "Fuir", "Japanese": "逃げる", }, }
The text must match the key exactly, including capitals, spaces and punctuation. When the table has no entry for the text, or the entry has none for the current language, the text is displayed as written. Choice menus and the default Input scene translate their texts with the translate() function (see Translating Other Content). An entry that isn't a Dictionary of translations, such as "Attack": "Attaquer", is reported as an error, and the text is displayed as written. Language names must be spelled exactly as in your Variation names (see Translating Speech). Choice Menus The texts of a Choice_List are translated through these tables:
TextChoice_List keyTable
Menu titleThe menu's Titlechoice_menu_titles
Menu promptThe menu's Promptchoice_menu_prompts
Category titleA category's Titlechoice_category_titles
Category promptA category's Promptchoice_category_prompts
Button labelA choice's Labelchoice_button_labels
Button tooltipA choice's Tooltipchoice_button_tooltips
Each table is in a script named after it, such as Choice_Button_Labels.gd. These scripts are 'safe' files: updates never overwrite them. See also Choice Menus. Input Scenes The default Input scene (Input_Text.gd) translates the texts of an Input command through these tables:
TextInput keyTable
InstructionsInstructionsinput_instructions
Placeholder textPlaceholderinput_placeholder_texts
Default text in the fieldTextinput_default_texts
An Input scene of your own doesn't translate anything unless its script does. It can read these tables, or your own, through the translation function (see Translating Other Content). Error Messages When the player's input is refused, the default Input scene displays the reason, translated through input_error_messages. The table already lists every message as a key, with no translations:
"Spaces are not allowed.": { "French": "Les espaces ne sont pas autorisés.", },
Messages that contain a number or a word are assembled from several pieces, and each piece is translated separately. For example, "Maximum 12 characters allowed." is assembled from the keys "Maximum " and " characters allowed.", with the number in between. Preserve the spaces at the start and end of each translation, so that the pieces join correctly. Blacklists and Whitelists The default Input scene can refuse an input that contains a forbidden word (a blacklist), or a word that isn't on a list of allowed words (a whitelist). The lists are in the input_blacklists and input_whitelists dictionaries, and each list contains a separate set of words for each language:
"insults": { "Default": ["mean*", "rude"], "French": ["méchant*", "impoli"], },
The scene only applies the words of the current language: a list with no words for that language doesn't filter the input. See Text Input. When Texts Are Translated A text is translated when its menu, category, button or Input scene is built. If the language changes while it is displayed, call the Engine's refresh_language() function (see Translating Speech). The Engine then calls refresh_language() on each of its open choice menus and Input scenes, which display their texts again in the new language:
  • A choice menu translates its title and prompt again, then passes the call on to its categories, which pass it on to their buttons.
  • The default Input scene translates its instructions, placeholder text and error message again. It also translates the default text in its field, unless the player has already changed it.
The Engine_Language command does the same when it changes the language. An Input scene or choice scene of your own can declare a refresh_language() function too. The Engine calls it if it exists.