Translating Custom Action Plugins
Starting from v1.3.3, you can translate custom actions by attaching translation files.
Translatable Parts
- You can translate property names and tooltips for properties.
- Class names (the names displayed in the list) and group names cannot be translated, but their tooltips can.
How to Implement Translations
Translation data is loaded by placing a CSV file created according to the specified format directly into the editor_translations folder within the plugin.
[Example Folder Structure]
res://addons/
└── custom_action_plugin/
├── custom_action.gd
└── editor_translations
└── custom_action.csv
- The
editor_translationsfolder must be at the same level as the custom action’s GDScript and directly under it. It works regardless of whether it is placed in theaddonsfolder or any other location outsidecustom_action_plugin. - The name of the GDScript does not need to match the name of the CSV file.
- One CSV file can be used for multiple GDScripts.
Sample CSV File
context,key,ja,en,ko,zh_CN,zh_TW,pt_BR,es_AR,de,ru
"CustomAction","Description","Custom Action: Tooltip","Custom Action: Tooltip","커스텀 액션: 툴팁","自定义动作:工具提示","自訂動作:工具提示","Ação personalizada: dica de ferramenta","Acción personalizada: descripción emergente","Benutzerdefinierte Aktion: Tooltip","Пользовательское действие: подсказка"
"CustomAction","group","Group","Group","그룹","组","群組","Grupo","Grupo","Gruppe","Группа"
"CustomAction:test_num","test_num(Number Tooltip)","Number Tooltip","Number tooltip","숫자 툴팁","数值工具提示","數值工具提示","Dica de ferramenta do número","Descripción emergente del número","Zahlen-Tooltip","Подсказка для числа"
"CustomAction:test_num","test_num","Number","Number","숫자","数值","數值","Número","Número","Zahl","Число"
"CustomAction:test_elements","test_elements(Element Tooltip)","Element Tooltip","Element tooltip","속성 툴팁","属性工具提示","屬性工具提示","Dica de ferramenta do elemento","Descripción emergente del elemento","Element-Tooltip","Подсказка для элемента"
"CustomAction:test_elements","test_elements","Element","Element","속성","属性","屬性","Elemento","Elemento","Element","Элемент"
"CustomAction:test_elements","Fire","Fire","Fire","불","火","火","Fogo","Fuego","Feuer","Огонь"
"CustomAction:test_elements","Water","Water","Water","물","水","水","Água","Agua","Wasser","Вода"
"CustomAction:test_elements","Earth","Earth","Earth","땅","土","土","Terra","Tierra","Erde","Земля"
- CSV only
custom_action.csv (1.7 KB) - Sample structure including the main script
custom_action_translation_sample.zip (2.2 KB)
Details of Columns
contextspecifies which property of the class it is associated with. However, descriptions returned byexport_groupandget_description()do not have associated properties, so they are omitted.keyspecifies the identifier defined in the script.- The subsequent columns define the text according to the language settings.
Translating Tabs, Groups, and Classes (v1.3.4+)
Starting from v1.3.4, you can translate tabs, groups, and classes. The sample is as follows.
Note that for tabs and groups, only the key is provided, and the context is left blank.
context,key,ja,en,ko
,"Tab","Tab (JP)","Tab (EN)","Tab (KR)"
,"Group","Group (JP)","Group (EN)","Group (KR)"
"CustomAction","CustomAction","Custom Action (JP)","Custom Action (EN)","Custom Action (KR)"
contextindicates where the class belongs. Since tab and group names are not data of the class itself, thecontextcolumn is left empty.
Tips for Writing CSV
- Headers (
context,key,...) should not be quoted. - From the second line onwards, enclose all items in double quotes.
- Use UTF-8 with BOM.
- Use CRLF line endings.