First lookup the i18n key by calling the getSystemTextMapping(String key)
method from the class ModelerAPI
. Subsequently the translation can be retrieved using Core.getInternationalizedString(IContext context, String i18nKey, Object ..args)
or Core.getInternationalizedString(String languageCode, String i18nKey, Object ..args)
. The arguments parameter is optional here (can be used for template variables).
A code snippet illustrating this procedure:
String i18nKey = ModelerAPI.getSystemTextKeyMapping().get("mendix.widget.MxDataGrid.true");
String translation = Core.getInternationalizedString("en_US", i18nKey);
The translation of the boolean value 'false' can be found using the key "mendix.widget.MxDatagrid.false".