Inherits: Resource < Reference < Object

Inherited By: PHashTranslation

Language Translation.


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


String locale "en"


void add_message ( StringName src_message, StringName xlated_message )
void erase_message ( StringName src_message )
StringName get_message ( StringName src_message ) const
int get_message_count ( ) const
PackedStringArray get_message_list ( ) const

Property Descriptions

Default "en"
Setter set_locale(value)
Getter get_locale()

The locale of the translation.

Method Descriptions

Adds a message if nonexistent, followed by its translation.

Erases a message.

Returns a message's translation.

  • int get_message_count ( ) const

Returns the number of existing messages.

Returns all the messages (keys).