Internationalization
PT, EN, and ES with slang. How to add new strings.
The app supports English, Portuguese, and Spanish via slang.
Implementation
-
Never hardcode text inside
Text(). Add the key to all 3 JSON files:// correct Text(context.t.home.welcome) -
After editing any JSON file, run:
dart run slangThis regenerates
translations.g.dart. The app won't update without it: new strings stay invisible until you run the command.
Information
Files
lib/i18n/
en.i18n.json
pt.i18n.json
es.i18n.jsonLast updated on 08/02/2026

