How to localize a Flutter app with ARB files and AI translation

Flutter's built-in localization (flutter gen-l10n) turns ARB files into typed Dart methods. It works well — until you have hundreds of keys, several languages and translators who should not edit JSON in your repository. This guide shows a workflow where developers keep writing ARB files, AI and translators fill the other languages in Verba, and the app can even receive corrected texts without a new store release.

1. Standard gen-l10n setup

# pubspec.yaml
dependencies:
  flutter_localizations:
    sdk: flutter
  intl: any
flutter:
  generate: true
# l10n.yaml
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart

Write your source texts in the template file, with descriptions and typed placeholders:

{
  "phoneLengthRange": "Phone number must be between {min} and {max} digits.",
  "@phoneLengthRange": {
    "description": "Validation message on the sign-up form",
    "placeholders": { "min": { "type": "int" }, "max": { "type": "int" } }
  },
  "daysLeft": "{days, plural, one{{days} day left} other{{days} days left}}"
}

2. Connect the project to Verba

flutter pub add verba_translations
# verba.yaml (keep it out of git)
project: my-app
download_token: <read-token>
upload_token: <write-token>

3. Push, translate, fetch

dart run verba_translations

The first run pushes every key from the template — including descriptions, which translators and the AI see as context — to Verba. In Verba, click Translate missing (Traduce lipsă): the AI fills every other locale, keeping placeholders and plural forms intact, and marks the results as AI suggested for review.

Run the command again (or in CI before flutter build) and the translated ARB files come back. Your template keeps its metadata, so phoneLengthRange(int min, int max) stays exactly the same method.

4. Fix texts without a release

await VerbaOta.start(project: 'my-app');
runApp(const VerbaScope(child: MyApp()));

Text(VerbaOta.text(context, 'daysLeft', {'days': n}) ?? l.daysLeft(n));

A typo fixed in Verba reaches users the next time the app opens; offline users keep the compiled texts.

Checklist

See the full Flutter reference.

Start free Read the docs

© 2026 Verba