Class Translator

This class is used to translate the messages in another language See theTranslator for the one and only one instance of this class

Source : file core/uiLib/Translator.js at line 32

Constructor

new Translator ( )

Constructor

Source : file core/uiLib/Translator.js at line 45

Public methods

getText ( msgid, params )

Get a message translated

Source : file core/uiLib/Translator.js at line 71

Parameters

Name Type Description
msgid String

The id to identify the message

params null or Object

Parameters to include in the message

Returns

The message corresponding to the id, eventually with params added, or the id if the corresponding Translation was not found
Type : String

setTranslations ( translations )

Load the translations

Source : file core/uiLib/Translator.js at line 54

Parameters

Name Type Description
translations JsonObject

The translations to load

Private properties

#translations : Map of String

A js Map where the translations are stored, ordered by msgid

Source : file core/uiLib/Translator.js at line 39