Using translation-server in godot-editor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Toothgapsy

Hello community :slight_smile:

I am currently facing following problem: My team and i had the plan to make our game available in multiple languages. I read all the official docs on this topic and understood that the simplest way to implement this is using the global TranslationServer provided by the engine itself.
Now i am very much aware of how to use this in a script, for example on a label:
label.set_text(tr("SAMPLE_TEXT")).

However, I thought it would be a lot of unnecessary work if I had to handle this on every node, that contains a text, in a script.
But setting the text in the godot editor sadly doesn’t result in the engine translating the text, but just displaying tr(“SAMPLE_TEXT”).

Is there any workaround to this?

:bust_in_silhouette: Reply From: haledire

You don’t have to use set_text to input translations.

Objects in general have the ability to translate messages from a Translation.
This can be turned off with set_message_translation(), but by default this is on.

Your Label simply needs it’s text set to your translation text.
e.g. : Translation key: "HELLO WORLD!", Hello World
Label’s Text set in editor: HELLO WORLD
Label’s text when the scene is run: Hello World

Answer based off of 3.2