TranslationServer
Server that manages all translations.
Server that manages all translations. Translations can be set to it and removed from it.
- void add_translation ( translation )
Adds a Translation resource.
- void clear ( )
Clears the server from all translations.
- get_loaded_locales ( ) const
Returns an array of all loaded locales of the project.
Returns the current locale of the project.
See also OS.get_locale and to query the locale of the user system.
- String get_locale_name ( locale ) const
Returns a locale’s language and its variant (e.g. would return ).
- void remove_translation ( Translation translation )
Removes the given translation from the server.
- void set_locale ( locale )
Sets the locale of the project. The string will be standardized to match known locales (e.g. would be matched to ).
If translations have been loaded beforehand for the new locale, they will be applied.
- String translate ( message ) const