I18NextOptions class

Contains all options for I18Next to work properly.

Mixed in types

Constructors

I18NextOptions({List<String>? fallbackNamespaces, String? namespaceSeparator, String? contextSeparator, String? pluralSeparator, String? keySeparator, String? interpolationPrefix, String? interpolationSuffix, String? formatSeparator, String? interpolationUnescapePrefix, String? interpolationUnescapeSuffix, Map<String, Object>? formatterValues, Map<String, ValueFormatter>? formats, String? optionsSeparator, String? optionValueSeparator, String? nestingPrefix, String? nestingSuffix, String? nestingSeparator, String? pluralSuffix, MissingKeyHandler? missingKeyHandler, ValueFormatter? missingInterpolationHandler, TranslationFailedHandler? translationFailedHandler, EscapeHandler? escape, bool? escapeValue})
const

Properties

contextSeparator String?
The separator for contexts, it is inserted between the key and the context value.
final
escape EscapeHandler?
The escape handler that is called after interpolating and formatting a variable only if escapeValue is enabled.
final
escapeValue bool?
Whether to call escape after interpolating and formatting a variable.
final
fallbackNamespaces List<String>?
The namespaces used to fallback to when no key matches were found on the current namespace. These namespaces are evaluated in the order they are put in the list.
final
formats Map<String, ValueFormatter>?
formats is called when an interpolation has been found and it was marked with formatting options.
final
formatSeparator String?
interpolationPrefix and interpolationSuffix are the deliminators for the variable interpolation and formatting mechanism. By default they are '{{' and '}}' respectively and can't be null but can be empty.
final
formatterValues Map<String, Object>?
Helper that maps known or common formats values to a specific value.
final
hashCode int
The hash code for this object.
no setteroverride
interpolationPrefix String?
interpolationPrefix and interpolationSuffix are the deliminators for the variable interpolation and formatting mechanism. By default they are '{{' and '}}' respectively and can't be null but can be empty.
final
interpolationSuffix String?
interpolationPrefix and interpolationSuffix are the deliminators for the variable interpolation and formatting mechanism. By default they are '{{' and '}}' respectively and can't be null but can be empty.
final
interpolationUnescapePrefix String?
interpolationUnescapePrefix and interpolationUnescapeSuffix are used to denote that a specific interpolation is not supposed to be escaped.
final
interpolationUnescapeSuffix String?
interpolationUnescapePrefix and interpolationUnescapeSuffix are used to denote that a specific interpolation is not supposed to be escaped.
final
keySeparator String?
The separator for nested keys. It is used to denote multiple object levels of access when retrieving a key from a namespace.
final
missingInterpolationHandler ValueFormatter?
Called when the interpolation format in formats is not found, or when the value being interpolated is not a String.
final
missingKeyHandler MissingKeyHandler?
The default behavior is to just return the key itself that was used in I18Next.t.
final
namespaceSeparator String?
The separator used when splitting the key.
final
nestingPrefix String?
nestingPrefix and nestingSuffix are the deliminators for nesting mechanism. By default they are '$t(' and ')' respectively and can't be null but can be empty.
final
nestingSeparator String?
nestingPrefix and nestingSuffix are the deliminators for nesting mechanism. By default they are '$t(' and ')' respectively and can't be null but can be empty.
final
nestingSuffix String?
nestingPrefix and nestingSuffix are the deliminators for nesting mechanism. By default they are '$t(' and ')' respectively and can't be null but can be empty.
final
optionsSeparator String?
Options are delimited for the formats, and are defined between '(' and ')'.
final
optionValueSeparator String?
Options are delimited for the formats, and are defined between '(' and ')'.
final
pluralSeparator String?
The separator for plural suffixes, it is inserted between the key and the plural value ("plural" for simple rules, or a numeric index for complex rules with multiple plurals).
final
pluralSuffix String?
pluralSuffix is used for the pluralization mechanism.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
translationFailedHandler TranslationFailedHandler?
A callback that is used when the translation failed while being evaluated (e.g. interpolation, nesting).
final

Methods

copyWith({List<String>? fallbackNamespaces, String? namespaceSeparator, String? contextSeparator, String? pluralSeparator, String? keySeparator, String? pluralSuffix, String? interpolationPrefix, String? interpolationSuffix, String? formatSeparator, String? interpolationUnescapePrefix, String? interpolationUnescapeSuffix, Map<String, Object>? formatterValues, Map<String, ValueFormatter>? formats, String? optionsSeparator, String? optionValueSeparator, String? nestingPrefix, String? nestingSuffix, String? nestingSeparator, MissingKeyHandler? missingKeyHandler, ValueFormatter? missingInterpolationHandler, TranslationFailedHandler? translationFailedHandler, EscapeHandler? escape, bool? escapeValue}) I18NextOptions
Creates a new instance of I18NextOptions overriding any of the properties that aren't null.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
merge(I18NextOptions? other) I18NextOptions
Creates a new instance of I18NextOptions overriding any properties where other isn't null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

base → const I18NextOptions