string_translate
2.0.1, released a year ago by julianschumacher.dev
Translate strings to different languages at runtime in Dart and Flutter.
WASM-ready
What it does
Helps translate strings at runtime by initializing package code and providing translations and locales. It natively brings support for English, German, French, Spanish, and Portuguese.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a simple runtime string translation mechanism in your Flutter or Dart app.
- You want to translate strings using a clean extension method like 'Hello'.tr().
Skip it when
- You require complex ICU message formatting or extensive locale-aware number and date formatting not covered by the basic translation logic.
- You prefer compile-time safe l10n generation tools.
Strengths
- Pure Dart code, usable without Flutter or extra native setup like Cocoapods.
- Native support for multiple common languages out of the box.
Weaknesses
- Limited documentation on advanced configuration and setup steps.
- Not documented for pluralization or complex interpolation.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Just import the package, init it, and provide values.
final String text = "Hello".tr();Alternatives
Packages that do the same job and could replace string_translate.
- translator
Free, unofficial Google Translate API wrapper for Dart and Flutter.
57Compare - translator_plus
Free and unlimited Google Translate API wrapper for Dart and Flutter.
38Compare