Flutter · One codebase, native feel

How do you localize a Flutter app?

MediumlocalizationintlrtlaccessibilityUpdated Oct 2026
Quiz this track

Short answer

Use flutter_localizations with ARB files and generated localizations. Keep strings out of widgets, support plural and select messages, and test right-to-left layouts and text expansion.

The gen-l10n tool reads ARB files and generates typed localization classes. MaterialApp receives the generated delegates and supported locales. Flutter resolves the device locale against that list and rebuilds dependents when the locale changes.

json
{
  "greeting": "Hello",
  "itemCount": "{count, plural, =0{No items} one{1 item} other{{count} items}}",
  "welcome": "Welcome, {name}"
}
dart
MaterialApp(
  localizationsDelegates: AppLocalizations.localizationsDelegates,
  supportedLocales: AppLocalizations.supportedLocales,
  home: const HomePage(),
)
  • Never concatenate translated fragments to form a sentence
  • Use plural and select messages so grammar works in every language
  • Avoid fixed-width text containers where translation can expand
  • Test right-to-left languages and use directional padding and alignment
  • Format dates, numbers and currencies with intl using the active locale

Operational concerns

Translation is a content pipeline, not only a code change. Decide how keys are named, how missing translations are detected in CI, and how translators receive context. A missing key should fail the build or be clearly reported, not silently fall back in production without anyone noticing.

Localization also affects layout direction. A left-to-right design with hardcoded EdgeInsets.only(left: 16) can look broken in Arabic or Hebrew. Use EdgeInsetsDirectional and AlignmentDirectional.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Why should you avoid concatenating translated strings?
  2. 2How does locale resolution choose a supported locale?
  3. 3What changes in a right-to-left layout?
  4. 4How would you catch missing translation keys in CI?

Say it in the interview

I use flutter_localizations with ARB files and generated typed classes, so strings are not hardcoded in widgets. Plurals and selects go through ICU messages rather than concatenation. I also test right-to-left layouts with directional padding, and I make missing keys visible in CI. Localization is a content pipeline, so naming and translator context matter as much as the code.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Flutter mock interview and get scored feedback on depth, clarity and confidence.