TranslationServer

Inherits: Object

Servidor que gestiona todas las traducciones.

Descripción

Servidor que gestiona todas las traducciones. Las traducciones pueden ser configuradas y eliminadas de él.

Tutoriales

Métodos

void

add_translation ( Translation translation )

void

clear ( )

Array

get_loaded_locales ( ) const

String

get_locale ( ) const

String

get_locale_name ( String locale ) const

void

remove_translation ( Translation translation )

void

set_locale ( String locale )

String

translate ( String message ) const

Descripciones de Métodos

Añade un recurso de Translation.


  • void clear ( )

Borra el servidor de todas las traducciones.


  • Array 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 OS.get_locale_language to query the locale of the user system.


Devuelve el locale de un lenguaje y su variante (por ejemplo, "en_US" devolvería "English (United States)").


Elimina la traducción dada del servidor.


  • void set_locale ( String locale )

Sets the locale of the project. The locale string will be standardized to match known locales (e.g. en-US would be matched to en_US).

If translations have been loaded beforehand for the new locale, they will be applied.


Devuelve la traducción del locale actual para el mensaje dado (clave).