Flutter
Integrate i1n with Flutter using ARB files and flutter_localizations.
Setup
Run i1n init in your Flutter project. The CLI detects flutter_localizations in pubspec.yaml and configures ARB format. Files are stored in lib/l10n/ by default.
Flutter uses its native localization system — there is no i1n SDK for Dart. The CLI manages your ARB files, and Flutter's gen-l10n generates the Dart code.
Usage
Use AppLocalizations.of(context) to access translations in your widgets. Flutter's built-in code generation creates the localization delegate from your ARB files.
i1n handles the ARB format's metadata and placeholders, ensuring variables like {name} and {count} are properly protected during AI translation.
Workflow
Add keys to your source ARB file (e.g., app_en.arb), run i1n push --translate to translate, then i1n pull to fetch the translated ARB files. Run flutter gen-l10n to regenerate the Dart localization code.
Bridge Mode is not applicable to Flutter — the platform uses its own native localization pipeline. i1n acts as the translation infrastructure layer, managing files and AI translation.
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
Text(AppLocalizations.of(context)!.hello)