Problems with translating instantiated scenes through code

Godot Version

4.3

Question

I’m learning how to translate labels, buttons, … with the autotranslating system Godot uses, but when I instantiate a scene for example a dialogue balloon and then change its text through code to the keyword I’m using in the CSV file, it will always use the English (en) translation even though I changed it in the Global script.

The CSV:

Column 1 Column 2 Column 3 Column 4
keyword en es
bob1 Hello Hola

This is the world script which spawns the dialogue balloon:

This is the dialogue balloon script:

This is the Global script which I only use to change the language

I also went to Project Settings, Localization and add the CSV translations (en, es).

To use tranlasted text from scripts use the tr function

dialogueBallon.text = tr("bob1")