flutter-setup-localization

Configure Flutter internationalization with flutter_localizations, l10n.yaml, and AppLocalizations generation.

2.8k|166|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/flutter/agent-plugins --skill flutter-setup-localization-flutter
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-setup-localization
Source: https://github.com/flutter/agent-plugins/tree/main/skills/flutter-setup-localization
Command: npx skills add https://github.com/flutter/agent-plugins --skill flutter-setup-localization-flutter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the complex, multi-step process of configuring internationalization (i18n) and localization (l10n) in Flutter projects, preventing common setup errors and ensuring consistent architecture.

Core Features & Use Cases

  • Dependency Management: Automatically adds and configures flutter_localizations and intl packages.
  • Configuration Automation: Generates the required l10n.yaml file and enables code generation in pubspec.yaml.
  • Use Case: Use this when starting a new project or adding multi-language support to an existing app to ensure the AppLocalizations class is correctly generated and integrated into the widget tree.

Quick Start

Run the flutter-setup-localization skill to configure the necessary dependencies and generate the localization files for this project.

Frequently Asked Questions about flutter-setup-localization

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

FAQPage Schema
How do I set up Flutter localization in an existing app?▼

Setting up Flutter localization involves adding flutter_localizations dependencies and generating an l10n.yaml file. This automation configures your existing app to support multi-language workflows and generates the necessary AppLocalizations class.

What is the standard way to configure i18n in a Flutter project?▼

Configuring i18n in a Flutter project requires enabling code generation in pubspec.yaml and creating an l10n.yaml file. This process standardizes internationalization architecture and provides type-safe string access via the AppLocalizations class.

How do I generate the AppLocalizations class in Dart?▼

Generating the AppLocalizations class requires configuring the intl package and enabling code generation flags in pubspec.yaml. This skill manages these build configurations to ensure your Dart code has type-safe string access.

Can I use this to add multi-language support to a new Flutter project?▼

Yes, you can use this to add multi-language support to a new Flutter project. It satisfies requirements for flutter_localizations integration and l10n.yaml setup, ensuring your application is correctly configured for internationalization from the start.

Why is my Flutter AppLocalizations class not generating correctly?▼

Your Flutter AppLocalizations class might not generate due to missing l10n.yaml configuration or disabled code generation in pubspec.yaml. Automating this setup prevents common configuration errors and ensures proper class generation.