JsonIntl class
Main translation entry point. to get an instance of this class, call
JsonIntl.of(context)
Constructors
Properties
Methods
-
count(
num value, String key, {Map< String, dynamic> ? map, Map<String, MustacheFilter> ? filters, bool? strict}) → String -
Return the string corresponding to
key
, usingmap
andfilters
to replace the mustache-like variables.value
is a number that helps to choose the right translation variant according to the current language rules. Ifstrict
isfalse
the language rules are bent to always return the values for zero, one and two. -
gender(
JsonIntlGender gender, String key, {Map< String, dynamic> ? map, Map<String, MustacheFilter> ? filters}) → String -
Return the string corresponding to
key
, usingmap
andfilters
to replace the mustache-like variables. gender helps to choose the right translation variant for the specified gender. -
get(
String key, [Map< String, dynamic> ? map, Map<String, MustacheFilter> ? filters]) → String -
Return the string corresponding to
key
, usingmap
andfilters
to replace the mustache-like variables. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translate(
String key, {JsonIntlGender? gender, int? count, Map< String, dynamic> ? map, Map<String, MustacheFilter> ? filters, bool? strict}) → String - General purpose translation
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context) → JsonIntl -
Get the nearest JsonIntl instance available within the
context