Constructor
# new I18nParser()
Extends TranslateParser to support string formatting with parameters.
Custom implementation of TranslateParser for interpolation.
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. |
- The interpolated translation string.
string