My game can translate keys into 3 different languages (English, Chinese, Japanese)
I verified that each translation works using the "test" feature in project settings.
I want to add buttons in game that changes the language of the game into one of the three languages, i.e., there will be a button labelled "English", which when pressed turns all text into English etc.
I found that this can be done by modifying the "locale" value in a "Translation" class (documentation) However, when I try to use the Translation class's functions in code, it gives me a syntax error
Non-static function "get_locale" can only be called from an instance (I am calling it from the player object, but as far as I can tell, there is no way to instantiate "Translation" since it cannot be added as a child node)
I see people changing the in game language of their games like in this video, so obviously it is possible to change the current language at run time but nobody anywhere has said how that can be done.