flutter avatar

Flutter Setup Localization

Skip the manual wiring when you start a new Flutter app that needs translations. This skill runs the `flutter_localizations` and `intl` setup in one pass: it adds both packages, flips `generate: true` in `pubspec.yaml`, and drops in an `l10n.yaml` pointing at `lib/l10n` with `app_en.arb` as the template. It also walks through registering the delegates and supported locales on `MaterialApp`. The source covers the full loop, including ARB placeholders, plurals, and select statements, so you're not stuck after the first string. My take: the `synthetic-package: true` default is worth a second look if you prefer generated code visible in your repo, since the import path changes with that flag.

skills.sh installs
38.7K
GitHub stars
3.2K
last updated
Oct 26, 2026

Install

$ npx -y skills add flutter/agent-plugins --skill flutter-setup-localization --agent claude-code

Installs into .claude/skills of the current project.

Files

Internationalizing Flutter Applications

Contents

Core Concepts

Flutter handles internationalization (i18n) and localization (l10n) via the flutter_localizations and intl packages. The standard approach uses App Resource Bundle (.arb) files to define localized strings, which are then compiled into a generated AppLocalizations class for type-safe access within the widget tree.

Setup Workflow

Copy and track this checklist when initializing internationalization in a Flutter project:

  • Task Progress
    • 1. Add dependencies to pubspec.yaml.
    • 2. Enable the generate flag.
    • 3. Create the l10n.yaml configuration file.
    • 4. Configure MaterialApp or CupertinoApp.

1. Add Dependencies

Add the required localization packages to the project. Execute the following commands in the terminal:

flutter pub add flutter_localizations --sdk=flutter
flutter pub add intl:any

Sponsors

Details

Repository
github.com/flutter/agent-plugins
Categories
AI & Agent Building, Mobile Development
First seen
Oct 26, 2026

More from flutter/agent-plugins

All 10
1flutter avatarflutter-use-http-packageflutter/agent-pluginsUse the `http` package to execute GET, POST, PUT, or DELETE requests. Use when you need to fetch from or send data to a REST API.37.9Kskills.sh installs
2twostraws avatarswiftui-protwostraws/swiftui-agent-skillComprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projec37.5Kskills.sh installs
3firebase avatarfirebase-firestore-standardfirebase/agent-skillsComprehensive guide for Firestore Standard Edition, including provisioning, security rules, and SDK usage. Use this skill when the user needs help setting up Fi37Kskills.sh installs
4avdlee avatarswiftui-expert-skillavdlee/swiftui-agent-skillUse when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management and `@Observable` data flow, view composition and invalida36.2Kskills.sh installs
5firebase avatarfirebase-firestore-enterprise-native-modefirebase/agent-skillsComprehensive guide for Firestore enterprise native including provisioning, data model, security rules, and SDK usage. Use this skill when the user needs help s36Kskills.sh installs
6neondatabase avatarneon-postgres-egress-optimizerneondatabase/agent-skillsDiagnose and fix excessive Postgres egress (network data transfer) in a codebase. Use when a user mentions high database bills, unexpected data transfer costs, 35.1Kskills.sh installs