elmm-programing/opencode/flutter-localization

Claude Code and agent skill by elmm-programing/opencode

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Internationalization, ARB Files & Locale Management

Install

npx vskill@latest install elmm-programing/opencode/flutter-localization

SKILL.md

The same SKILL.md was published earlier as elmm-programing/opencode/flutter-localization.

Localization Setup

  • Use Flutter's built-in flutter_localizations and intl packages
  • Enable generate: true in pubspec.yaml for automatic code generation
  • Configure l10n.yaml at project root:

``yaml arb-dir: lib/l10n template-arb-file: app_en.arb output-localization-file: app_localizations.dart output-class: AppLocalizations nullable-getter: false ``

ARB File Structure

  • Place all .arb files in lib/l10n/
  • Use app_{locale}.arb naming convention (e.g., app_en.arb, app_es.arb, app_hi.arb)
  • The template ARB file (app_en.arb) MUST contain @ metadata for every key:

``json { "loginTitle": "Sign In", "@loginTitle": { "description": "Title on the login screen" }, "itemCount": "{count, plural, =0{No items} =1{1 item} other{{count} items}}", "@itemCount": { "description": "Item count with pluralization", "placeholders": { "count": { "type": "int" } } } } ``

  • Key naming: Use featureName_context format (e.g., settings_title, login_emailHint)
  • Group keys by feature in the ARB file with comment separators

Usage Rules

  • Access strings via context.l10n.keyName using a BuildContext extension
  • STRICTLY prohibit hardcoded user-facing strings anywhere in the codebase
  • STRICTLY prohibit using .l10n in initState() or outside the widget tree — context must be available
  • For date/time/number formatting, use intl package formatters with the current locale

Plural & Select Forms

  • Use ICU plural syntax for countable items: {count, plural, =0{...} =1{...} other{...}}
  • Use ICU select syntax for gender/category: {gender, select, male{...} female{...} other{...}}
  • Always include the other case as a fallback

RTL Support

  • Use Directionality and TextDirection-aware widgets
  • Prefer EdgeInsetsDirectional over EdgeInsets for padding/margins
  • Use start/end instead of left/right in MainAxisAlignment and CrossAxisAlignment
  • Test with RTL locales during widget testing

Adding a New Language

  1. Create app_{locale}.arb with all keys translated
  2. Run flutter gen-l10n (or rely on auto-generation)
  3. Add the Locale to supportedLocales in MaterialApp
  4. Verify with widget tests using the new locale

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/elmm-programing/opencode/flutter-localization/badge)](https://verified-skill.com/skills/elmm-programing/opencode/flutter-localization)

Something wrong with this skill or its page? Tell us.