i18n.localizeΒΆ

This command localizes a phrase.

key (string)
The property key.
locale (string)
A string-representation of a locale. If the locale is not set, the site language is used.
values (string[])
Optional placeholder values.

Example:

var message_multi_placeholder = execute('i18n.localize', {
  key: 'menu',
});

var message_multi_placeholder = execute('i18n.localize', {
  key: 'greetings',
  locale: "no",
  values: ["John", "London"]
});