Inherits: Resource < RefCounted < Object
Inherited By: OptimizedTranslation
A language translation that maps a collection of strings to their individual translations.
Translations are resources that can be loaded and unloaded on demand. They map a collection of strings to their individual translations, and they also provide convenience methods for pluralization.
|
_get_message ( StringName src_message, StringName context ) virtual const | |
_get_plural_message ( StringName src_message, StringName src_plural_message, int n, StringName context ) virtual const | |
void | add_message ( StringName src_message, StringName xlated_message, StringName context="" ) |
void | add_plural_message ( StringName src_message, PackedStringArray xlated_messages, StringName context="" ) |
void | erase_message ( StringName src_message, StringName context="" ) |
get_message ( StringName src_message, StringName context="" ) const | |
get_message_count ( ) const | |
get_message_list ( ) const | |
get_plural_message ( StringName src_message, StringName src_plural_message, int n, StringName context="" ) const | |
get_translated_message_list ( ) const |
"en"
The locale of the translation.
Virtual method to override get_message.
Virtual method to override get_plural_message.
Adds a message if nonexistent, followed by its translation.
An additional context could be used to specify the translation context or differentiate polysemic words.
Adds a message involving plural translation if nonexistent, followed by its translation.
An additional context could be used to specify the translation context or differentiate polysemic words.
Erases a message.
Returns a message's translation.
Returns the number of existing messages.
Returns all the messages (keys).
Returns a message's translation involving plurals.
The number n is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
Returns all the messages (translated text).
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_translation.html