flutter-setup-localization

Configure Flutter localization with flutter_localizations, intl, ARB files, and generated AppLocalizations classes.

1|Updated Aug 31, 2026
One-click install
npx skills add https://github.com/nguyenhungtran18/skill-and-tool-tracker --skill flutter-setup-localization-nguyenhungtran18
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-setup-localization
Source: https://github.com/nguyenhungtran18/skill-and-tool-tracker/tree/main/skills/flutter-setup-localization
Command: npx skills add https://github.com/nguyenhungtran18/skill-and-tool-tracker --skill flutter-setup-localization-nguyenhungtran18

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires flutter_localizations, intl.

What problem does it solve? Setting up internationalization in a Flutter project involves multiple coordinated steps—adding dependencies, enabling code generation, creating configuration files, and wiring delegates into the app entry point—which is error-prone when done from memory. ## Core Features & Use Cases - Guided Setup Checklist: Walks through adding flutter_localizations and intl to pubspec.yaml, enabling the generate flag, and creating the l10n.yaml configuration file. - ARB File Workflow: Explains how to define strings in template .arb files, add translations for other locales, and regenerate the AppLocalizations class with flutter pub get. - Advanced Formatting: Covers placeholders, plural syntax, and select syntax for dynamic, quantity-based, and gendered strings. - Use Case: You are starting a new Flutter app that must ship in English and Spanish. Follow the checklist to configure localization, define app_en.arb and app_es.arb, and render translated text via AppLocalizations.of(context). ## Quick Start Set up localization in my Flutter project by adding the required dependencies, creating the l10n.yaml file, and configuring MaterialApp with English and Spanish locales.

Frequently Asked Questions about flutter-setup-localization

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

FAQPage Schema
How do I add localization to a Flutter app?▼

Add the flutter_localizations and intl packages to pubspec.yaml, set generate: true under the flutter section, and create an l10n.yaml file pointing to your ARB directory. Then run flutter pub get to generate the AppLocalizations class and wire its delegates into MaterialApp.

What is the l10n.yaml file in Flutter?▼

The l10n.yaml file configures Flutter's localization code generation. It specifies the ARB input directory, the template ARB file, the output Dart file name, and options like synthetic-package and use-escaping.

How do I use placeholders and plurals in Flutter ARB files?▼

Define parameters in curly braces inside the ARB string and declare their types in the metadata object. For plurals, use the plural syntax with cases like =0, =1, and the mandatory other case; for gendered text, use the select syntax.

Why is AppLocalizations.of(context) returning null?▼

This happens when the calling widget is not a descendant of MaterialApp or CupertinoApp, or when the localization delegates are not registered. Ensure AppLocalizations.delegate and the Global delegates are listed in localizationsDelegates.

Does Flutter localization require running code generation manually?▼

Running flutter pub get triggers generation when the generate flag is enabled in pubspec.yaml. If ARB syntax errors occur, the terminal output reports them so you can fix missing commas or mismatched placeholders and re-run the command.