localization
2.1.1, released 3 years ago by flutterando.com.br
Simplify in-app translations using JSON files or maps with string extensions.
WASM-ready
What it does
It simplifies app translation by providing an extension on strings called i18n(). It supports loading localizations from JSON files or a Dart map, and integrates with Flutter's localization delegates.
AI-written summary of version 2.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want simple file-based JSON translations without code generation
- You prefer calling an extension method like 'key'.i18n() on strings
Skip it when
- You need compile-time safety or auto-completed translation keys
- You need complex pluralization rules handled automatically by the package
Strengths
- Simple integration via string extensions
- Supports multiple directory paths for translation files
- Can use either JSON files or a direct Dart map for translations
Weaknesses
- No compile-time key checking or code generation
- Some pluralization and conditional features were removed in major versions
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Requires adding assets path in pubspec.yaml and registering delegates in MaterialApp.
String text = 'welcome-text'.i18n();Alternatives
Packages that do the same job and could replace localization.
- easy_localization
A popular alternative for JSON/CSV-based localization with broader feature sets.
64Compare - slang
Offers strongly-typed translations and code generation.
90Compare