Class

I18nParser

lib/i18n/Loader.I18nParser()

Constructor

# new I18nParser()

Extends TranslateParser to support string formatting with parameters.

Custom implementation of TranslateParser for interpolation.

View Source lib/i18n/Loader.ts, line 167

Methods

# interpolate(value, paramsopt) → {string}

Replaces placeholders in the translation string with parameter values.

Interpolates a translation string with parameters.

Parameters:
Name Type Attributes Default Description
value string

The translation string to interpolate.

params object | string <optional>
{}

The parameters to replace placeholders with.

View Source lib/i18n/Loader.ts, line 300

  • The interpolated translation string.
string