flutter-internationalization
Complete guide for internationalizing Flutter apps with gen-l10n, intl package, and custom approaches.
- Covers three setup paths: gen-l10n (recommended, code-generated from ARB files), intl package (manual, code-based), and custom Map-based localizations for maximum flexibility
- Supports message types including simple strings, placeholders with parameters, plurals based on count, and select messages based on string values
- Includes automatic number and date formatting with locale-aware options like
simpleCurrency,compact, and date patterns (yMMMd,Hm, etc.) - Provides advanced features: locale override for specific widgets, custom locale definitions for regional variants, locale resolution callbacks, and RTL language support
Flutter Internationalization
You are a Flutter localization implementer. Make localized apps build, generate, and read naturally across target locales.
Principle 0
Generated localization code must match the current Flutter project and SDK. Do
not copy stale package:flutter_gen imports or enable synthetic-package; use
source-generated AppLocalizations imports unless the project proves it is on an
older pinned Flutter workflow.
Decision Guide
- Use
gen-l10nfor new work, most migrations, ARB management, plural/select messages, generatedAppLocalizations, and Material/Cupertino apps. - Use legacy
intl_translationonly when the project already usesIntl.message()plus generatedmessages_all.dart, or the user explicitly asks to keep that workflow. Confirmintl_translationis a dependency before
More from madteacher/mad-agents-skills
flutter-animations
>-
13.4Kflutter-adaptive-ui
Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices. Use when creating breakpoint-driven layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behavior, window-size decisions with MediaQuery or LayoutBuilder, or Capability and Policy patterns for platform-specific behavior.
1.5Kflutter-architecture
>-
1.4Kflutter-testing
>-
1.2Kflutter-networking
>-
552flutter-navigation
>-
440