Godot Version
v4.3.stable.steam [77dcf97d8]
Question
first script (node #1):
extends Node
signal titlestart
signal titleend
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
titlestart.emit()
TranslationServer.add_translation(load("res://localizations/engrish.translation"))
TranslationServer.add_translation(load("res://localizations/yapanese.translation"))
TranslationServer.add_translation(load("res://localizations/gibberish.translation"))
second script (Node #2):
func _on_button_pressed() -> void:
TranslationServer.set_locale("en")
func _on_button_2_pressed() -> void:
TranslationServer.set_locale("jp")
func _on_button_3_pressed() -> void:
pass # Replace with function body.
how do I change language for my game?