KasyKasy

Internationalization

PT, EN, and ES with slang. How to add new strings.

The app supports English, Portuguese, and Spanish via slang.

Implementation

  1. Never hardcode text inside Text(). Add the key to all 3 JSON files:

    // correct
    Text(context.t.home.welcome)
  2. After editing any JSON file, run:

    dart run slang

    This 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.json

Last updated on 08/02/2026