Localization extension
When you create a widget that has translatable strings, add this default import to the widget's file:
import 'package:i18n_extension_core/default.i18n.dart';
This will allow you to add .i18n
and .plural()
to your strings,
but won't translate anything.
- on
Properties
Methods
-
fill(
List< Object> params) → String -
Does an
sprintf
on thetext
with theparams
. This is implemented with thesprintf
package: https://pub.dev/packages/sprintf -
plural(
dynamic value) → String -
Translates a string where %d is replaced by the given number.
It returns the same
value
provided, where %d is replaced by the given number. This marks the string for future translation, and records the given value as a key missing translation with unknown locale.