flutter-internationalization

Configure Flutter app internationalization with gen-l10n and intl packages.

6|2|Updated Aug 14, 2025
One-click install
npx skills add https://github.com/Im5tu/claude --skill flutter-internationalization-im5tu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-internationalization
Source: https://github.com/Im5tu/claude/tree/main/skills/flutter-internationalization
Command: npx skills add https://github.com/Im5tu/claude --skill flutter-internationalization-im5tu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Flutter apps frequently struggle to support multiple languages and locale-specific formatting, leading to inconsistent UIs and maintenance headaches. This Skill provides a practical, end-to-end guide for adding internationalization using gen-l10n and the intl packages, enabling scalable translations and correct locale formatting across locales.

Core Features & Use Cases

  • Guided localization setup: configure gen-l10n, ARB file structure, and localization delegates in MaterialApp.
  • ARB-based translations: manage template and translation files to drive codegen.
  • Locale-aware formatting: format numbers and dates per locale and switch UI strings at runtime.
  • Use Case: onboarding a Flutter project with two languages (e.g., English and Spanish) including RTL support where needed.

Quick Start

Install Flutter, enable gen-l10n in pubspec.yaml, create lib/l10n with app_en.arb, add additional ARB files for each locale, run flutter pub get and flutter gen-l10n, then wire up LocalizationsDelegates and supportedLocales in MaterialApp and consume strings via AppLocalizations.

Frequently Asked Questions about flutter-internationalization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add internationalization to a Flutter app?

To add internationalization to a Flutter app, enable gen-l10n in pubspec.yaml, create ARB files in lib/l10n, run flutter gen-l10n, and configure MaterialApp with LocalizationsDelegates and supportedLocales. This generates code to consume translated strings via AppLocalizations.

What is the best way to manage Flutter localization with ARB files?

The best way to manage Flutter localization is using ARB files as templates for code generation. You create a template app_en.arb file, add translation files for each locale, and run flutter gen-l10n to generate the AppLocalizations class for your UI.

How does gen-l10n work with the intl package for locale-aware formatting?

The gen-l10n tool works with the intl package by generating Dart code from ARB files, allowing you to format numbers and dates per locale. You configure the delegates in MaterialApp to switch UI strings and apply locale-specific formatting at runtime.

Do I need a standard Flutter environment to configure localization delegates?

Yes, you need a standard Flutter environment to configure localization delegates. The setup assumes you have Flutter installed, gen-l10n enabled in pubspec.yaml, and a lib/l10n directory containing your ARB files before running flutter gen-l10n.

Can I use this Flutter localization setup for RTL support?

Yes, you can use this Flutter localization setup for RTL support. The guide covers onboarding a Flutter project with multiple languages like English and Spanish, including configuring locale-aware UI and handling RTL support where needed.

Why are my Flutter translations not showing after running flutter gen-l10n?

Flutter translations may not show if you have not properly wired up LocalizationsDelegates and supportedLocales in your MaterialApp. You must also ensure your lib/l10n directory contains valid ARB files and that you consume strings via the generated AppLocalizations class.