InterpolationConfiguration

@Serializable
class InterpolationConfiguration

Configuration options for interpolation in i18next.

This class allows you to configure how interpolation is handled in i18next, including formatting, escaping, and nesting of variables.

See also

Properties

Link copied to clipboard
@Transient
var defaultVariables: dynamic

Default variables to be used in all interpolations.

Link copied to clipboard

Whether to escape interpolated values.

Link copied to clipboard

The separator used to split format parameters in the interpolation.

Link copied to clipboard

The maximum number of replacements to prevent infinite loops during interpolation.

Link copied to clipboard

The separator used for options in nested interpolations.

Link copied to clipboard

The prefix used for nesting translations.

Link copied to clipboard

The escaped version of the nesting prefix.

Link copied to clipboard

The suffix used for nesting translations.

Link copied to clipboard

The escaped version of the nesting suffix.

Link copied to clipboard

The prefix for interpolation placeholders.

Link copied to clipboard

The escaped version of the prefix for interpolation.

Link copied to clipboard

Whether to skip interpolation if variables are missing.

Link copied to clipboard

The suffix for interpolation placeholders.

Link copied to clipboard

The escaped version of the suffix for interpolation.

Link copied to clipboard

The prefix indicating that a value should not be escaped.

Link copied to clipboard

The suffix indicating that a value should not be escaped.

Link copied to clipboard

Whether to use the raw value (before formatting) for escaping.

Functions

Link copied to clipboard

Sets default variables for interpolation using a TranslationConfiguration.

Link copied to clipboard
fun escape(escapeFunction: dynamic)

Sets a custom escape function for interpolation.

Link copied to clipboard
fun format(formatFunction: dynamic)

Sets a custom format function for interpolation.

Link copied to clipboard
fun rawDefaultVariables(defaultVariables: dynamic)

Sets default variables for interpolation using a dynamic object.