interpolator library

Functions

escape(String input) String
interpolate(Locale locale, String string, Map<String, dynamic> variables, I18NextOptions options) String
Replaces occurrences of matches in string for the named values in options (if they exist), by first passing through the I18NextOptions.formats before joining the resulting string.
interpolationPattern(I18NextOptions options) RegExp
interpolationUnescapePattern(I18NextOptions options) RegExp
nest(Locale locale, String string, Translate translate, Map<String, dynamic> variables, I18NextOptions options) String
Replaces occurrences of nested key-values in string for other key-values. Essentially calls I18Next.translate with the nested value.
nestingPattern(I18NextOptions options) RegExp

Typedefs

Translate = String? Function(String key, Locale locale, Map<String, dynamic> variables, I18NextOptions options)

Exceptions / Errors

InterpolationException
Exception thrown when the interpolate fails while processing for either not containing a variable or with malformed or incoherent evaluations.
NestingException
Exception thrown when the nest fails while processing