How to display translations in editor?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By chanon
:warning: Old Version Published before Godot 3 was released.

Is it possible to display translations inside the editor?
Right now it seems they are displayed only when running the game.

It would also be very useful to display translations inside the inspector.

luislodosm | 2020-10-26 23:14

:bust_in_silhouette: Reply From: chanon

After looking into this, I found that the TranslationServer (as of now) seems to be always disabled in the editor.

This is because in editor_node.cpp there is a call: TranslationServer::get_singleton()->set_enabled(false)

After commenting that out and rebuilding Godot I am now able to see translations. I’m not sure why it has to be disabled in the editor though.

UPDATE: I found out that Label’s set_text method instead of storing the key will store the translation. This means with the above modification, Labels will lose the correct key value in their text property and change it into the translated value. This is why the TranslationServer is disabled in the editor. The better solution though would be to have Label store the key and only translate when rendering (or possibly have a local cache of the translation)

:bust_in_silhouette: Reply From: AnidemDex

Pretty old question, but is the first page that appears on my searchs when I need something related to “translations” and “editor” in godot.

I made this plugin that simulates translation server in editor: