get() |
This method returns a TranslatableText object corresponding to the Textidentifier specified, which returns the translated label at runtime.
Syntax
localization.get(textidentifier);
Parameters
Parameter |
Description |
---|---|
textidentifier |
Required. Textidentifier for the label/message. |
Return Value
Returns the TranslatableText object.
Remarks
This method is used to get the TranslatableText object which returns the translated string at runtime. If there is no translation available for the specified TextIdentifier, it will be notified to the user and null will be returned.
Example
The following example shows how to use the get method:
application.importType("translation.library.util.Localization"); var localization = new Localization(dictionary);//dictionary is the MLM xml file var incorrectDateMessage = localization.get("Date validation message"); application.notify(incorrectDateMessage);