PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

FormatByKey

Looks up localized text in a LocalizationTable for this Translator locale by key. The optional args table is used for filling format parameters in the matching text entry.

Note that this method will throw an error in the following cases:

  • If none of the LocalizationTable|LocalizationTables available to this Translator include a value for the given key.
  • If the Articles/Format Strings|format string for the key uses numbered parameters and args is not an array.
  • If the Articles/Format Strings|format string uses named parameters and args is not a table with string keys.
  • If args is missing values for parameters that are used in the matching Articles/Format Strings|format string.

Parameters

Name Type Default Description

key

Returns

Return Type Summary