i18n_extension
16.0.3, released yesterday by glasberg.dev
Translation and localization for Flutter using Dart extensions to reduce boilerplate.
WASM-ready
What it does
Enables text internationalization in Flutter apps using Dart extensions on strings or identifiers. Supports plurals, genders, parameter interpolation, and locale management via code definitions, files, or HTTP.
AI-written summary of version 16.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want a localization setup without code generation steps.
- You prefer using source strings directly as translation keys.
- You need support for complex rules like pluralization and gender variants.
Skip it when
- Your project standardizes on standard arb/intl workflows or another localization ecosystem.
- You require strictly compile-time type-safe keys via code generation.
Strengths
- Minimal boilerplate using Dart extensions.
- Supports both string keys and traditional identifiers.
- Built-in support for pluralization, gender, and interpolation.
Weaknesses
- Not code-generated, which means keys are not checked statically at compile-time.
- License is unknown based on package metadata.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 6
Wrap your widget tree with a single I18n widget, provide supported locales, and configure MaterialApp delegates and locale fields.
Text('How are you?'.i18n);Alternatives
Packages that do the same job and could replace i18n_extension.
Works with
Packages commonly used together with i18n_extension: ones it builds on, ones built on it, and its own family.
- yamli18n_extension depends on itA Dart library for parsing YAML documents into Dart data structures.
- intli18n_extension depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- shared_preferencesi18n_extension depends on itFlutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.
- i18n_extension_corei18n_extension depends on itDart-only i18n library providing string extensions for translation, plural and gender handling.