Translating Enumerations client-side

0
During Mendix 4 you could translate certain system strings using a translate function. In the 6 client API, there exists a translate function on window.mx.ui.translate but I can't find any documentation on this. Is there a guide on how to use this. Currently we'd like to translate enumerations in JS
asked
1 answers
0

translatable strings are present in several translation objects/ widget 'classes', like: mendix.widget.DialogMessage, mendix.lib.Validations, mxui.common, mxui.widget.DataGrid, etc. Some come from system texts, others from widgets, etc.

The syntax of mx.ui.translate is:

mx.ui.translate(<translate object name/ declared (widget) class name>, <key of translatable string>, <array of strings of placeholders, used in the translatable text>, <default text>)

e.g.

mx.ui.translate("mendix.lib.Validations","required_field");

mx.ui.translate("mendix.widget.DialogMessage","cancel");

translate("mxui.sys.UI","connection_error");

 

However, it doesn't seem that enumerations are present anywhere in these objects. Normally, these are rendered server side in the page xml.

 

HTH

answered