I18nString

class I18nString

Encapsulates a string, which is translated and formatted lazily (i.e. the first time toString is called), as well as any input values.

Before formatting, the string is automatically translated using the I18nService.getText() method of the currently registered I18n service, if any.

Note: Objects of this class are returned by the strf function, refer to this function for valid format string placeholders.

Constructor

(format: string | { toString(): string; }, values?: any[]): I18nString

.format

{ toString(): string; }

Original format string.

.text

string

Translated format string, if any.

.update()

(values: any[]): this

Updates input values to given values; this clears the current result, if any.