The MessageFormat provides a means to produce concatenated messages in a language-neutral way. Use this class to construct messages displayed for end users.

MessageFormat is a static class based on Java MessageFormat. It must not be initialized and it's methods must be used statically.

1 MessageFormat

MessageFormat takes a set of objects, formats them, then inserts the formatted strings into the pattern at the appropriate places.

Copy
console.log(Ax.text.MessageFormat.format('hello {0}', 'world');
console.log(Ax.text.MessageFormat.format
    (
        'At {1,time} on {1,date}, there was {2} on planet {0,number,integer}', 
        7, 
        new Ax.sql.Date(2020,1,1, 12,30,30), 
        'a disturbance in the Force'
    )
);
hello world
At 12:30:30 PM on Jan 1, 2020, there was a disturbance in the Force on planet 7