A language translation that maps a collection of strings to their individual translations.
[Translation]s 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.
$DOCS_URL/tutorials/i18n/internationalizing_games.html $DOCS_URL/tutorials/i18n/locales.html
Virtual method to override [method get_message].
Virtual method to override [method 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 [param 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).
- The locale of the translation.