internationalization

Implements Flutter localization with ARB files, context.l10n extensions, and RTL directionality support.

162|23|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin --skill internationalization-verygoodopensource
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: internationalization
Source: https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/internationalization
Command: npx skills add https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin --skill internationalization-verygoodopensource

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Flutter apps often ship with hardcoded user-facing strings, inconsistent localization setups, and layouts that break in right-to-left languages. This Skill enforces a single, standards-based i18n workflow so translations, pluralization, and RTL layouts are handled correctly from the start. ## Core Features & Use Cases - Built-in localization setup: Configures flutter_localizations and intl with l10n.yaml, ARB files as the single source of truth, and flutter gen-l10n code generation. - Ergonomic l10n access: Establishes the context.l10n BuildContext extension pattern and keeps shared widgets decoupled from AppLocalizations by passing localized strings as parameters. - RTL and directionality support: Replaces EdgeInsets left/right with EdgeInsetsDirectional start/end, handles icon and image mirroring, and follows Material bidirectionality rules. - Use Case: When asked to add a third-party package like easy_localization or slang, the Skill redirects to Flutter's built-in system and migrates the strings into ARB files with proper placeholder metadata. ## Quick Start Ask the assistant to set up internationalization in your Flutter app with English and Spanish locales using ARB files and the context.l10n pattern.

Frequently Asked Questions about internationalization

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

FAQPage Schema
How do I add localization to a Flutter app with ARB files?

Add flutter_localizations and intl dependencies, set generate: true in pubspec.yaml, create l10n.yaml pointing to your ARB directory, and run flutter gen-l10n. Then wire localizationsDelegates and supportedLocales into MaterialApp.

Should I use easy_localization or Flutter's built-in localization?

Use Flutter's built-in flutter_localizations with intl and ARB files. Third-party packages like easy_localization, slang, or flutter_i18n are discouraged because the built-in system provides code generation, type safety, and official support.

How do I handle plurals in Flutter localization?

Define plural strings in the template ARB file using ICU message syntax, such as {count, plural, =0{No items} other{{count} items}}. Add placeholder metadata with type int, translate all locales, then access via context.l10n after running flutter gen-l10n.

Does Flutter support right-to-left languages like Arabic?

Yes, Flutter supports RTL through the Directionality widget and directional widgets like EdgeInsetsDirectional, PositionedDirectional, and AlignDirectional. Icons mirror automatically, while images need matchTextDirection set to true.

Can shared Flutter widgets use AppLocalizations directly?

No, shared widgets in separate packages should not depend on AppLocalizations because that locks every consuming app to the package's translations. Instead, accept localized strings as constructor parameters and pass context.l10n values at the call site.