i69n
3.6.0, released 7 months ago by fnx.io
Simple internationalization tool based on YAML files and Dart source code generation.
What it does
Generates strongly-typed Dart classes from YAML translation files. Allows accessing messages using getters, methods with parameters, and pluralization rules.
AI-written summary of version 3.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want compile-time checking for your localization keys.
- Your localized strings require parameters or pluralization.
- You prefer generating Dart classes from YAML over standard heavy i18n approaches.
Skip it when
- You cannot use build_runner or source code generation in your workflow.
- You need dynamic runtime loading of translations from remote servers without pre-defined classes.
Strengths
- Compile-time message checking and typed getters/methods.
- Supports pluralization, custom language rules, and region support.
- Allows dynamic access via string keys when needed.
Weaknesses
- Requires keeping build_runner running during development.
- Custom pluralization requires manual implementation for languages other than English, Czech, and Ukrainian.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 4
Add i69n as dependency, build_runner as dev_dependency, and run build_runner to generate classes from YAML files.
ExampleMessages m = ExampleMessages();
print(m.users.welcome('World'));Alternatives
Packages that do the same job and could replace i69n.
- slang
Type-safe i18n solution generating Dart translation classes from JSON, YAML, CSV, or ARB files
90Compare - intl
A Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
93Compare - intl_translation
Generates Dart code for intl messages from ARB files for localization.
85Compare - flutter_arb_translator
A command line tool to automatically translate Flutter ARB localization files using various APIs.
71Compare
Works with
Packages commonly used together with i69n: ones it builds on, ones built on it, and its own family.
- yamli69n depends on itA Dart library for parsing YAML documents into Dart data structures.
- dart_stylei69n depends on itProvides an API and CLI to format Dart source code automatically.
- buildi69n depends on itPackage for authoring build_runner compatible code generators.
- build_configi69n depends on itFormat definition and support for parsing build.yaml configuration.
- build_runnerUsed togetherA build system for Dart code generation and modular compilation.