Translation

Inherits: Resource < Reference < Object

Inherited By: PHashTranslation

Category: Core

Brief Description

Language Translation.

Member Functions

void add_message ( String src_message, String xlated_message )
void erase_message ( String src_message )
String get_locale ( ) const
String get_message ( String src_message ) const
int get_message_count ( ) const
StringArray get_message_list ( ) const
void set_locale ( String locale )

Description

Translations are resources that can be loaded/unloaded on demand. They map a string to another string.

Member Function Description

void add_message ( String src_message, String xlated_message )

Add a message for translation.

void erase_message ( String src_message )

Erase a message.

String get_locale ( ) const

Return the locale of the translation.

String get_message ( String src_message ) const

Return a message for translation.

int get_message_count ( ) const

StringArray get_message_list ( ) const

Return all the messages (keys).

void set_locale ( String locale )

Set the locale of the translation.

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_translation.html