i18NV3 - format(String message, Object map)

Formats a string containing named tokens with values from a map.

Table 1. Parameters
Name Type Description
message String The message to have the tokens added.
map Object The map of name/value pairs to replace in the message.
Table 2. Returns
Type Description
String The formatted string
// Returns: "The rich young ruler was very very rich"
nowapi.i18n.format("The {p1} {p2} {p3} was very very {p1}",{p1: "rich", p2: "young", p3: "ruler"});