TranslationServer

Inherits: Object

Server that manages all translations.

Description

Server that manages all translations. Translations can be set to it and removed from it.

Methods

voidadd_translation ( Translation translation )
voidclear ( )
Arrayget_loaded_locales ( ) const
Stringget_locale ( ) const
Stringget_locale_name ( String locale ) const
voidremove_translation ( Translation translation )
voidset_locale ( String locale )
Stringtranslate ( String message ) const

Method Descriptions

Adds a Translation resource.


  • void clear ( )

Clears the server from all translations.


  • Array get_loaded_locales ( ) const

Returns an Array of all loaded locales of the game.


Returns the current locale of the game.


Returns a locale’s language and its variant (e.g. "en_US" would return "English (United States)").


Removes the given translation from the server.


  • void set_locale ( String locale )

Sets the locale of the game.


Returns the current locale’s translation for the given message (key).

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.