dimitriremoiville/cc-mobile/localization-arb
Claude Code and agent skill by dimitriremoiville/cc-mobile
- community
Checking that the SKILL.md file is still in the repository.
Flutter localization with ARB files + `flutter_localizations` + generated `AppLocalizations` — file layout, placeholder discipline, plurals, dates/numbers, runtime locale switching, CI gates. Load whenever adding or editing user-visible strings.
Install
npx vskill@latest install dimitriremoiville/cc-mobile/localization-arbSKILL.md
The same SKILL.md was published earlier as dimitriremoiville/cc-mobile/localization-arb.
Localization (ARB)
File layout
l10n.yaml at the project root:
pubspec.yaml:
Wire-up
No more S.of(context) / tr('key') in new code.
ARB discipline
app_en.arb is the source of truth. Every other locale mirrors its keys; missing keys fall back to English.
- Every non-trivial key gets a
descriptionso translators understand context. - Placeholders declare a
type(String / int / num / DateTime / double). The generator picks the right Intl method. - Plurals use ICU
{count, plural, ...}. Covers English trivially; for languages with more plural categories (ar, ru, pl), translators add the categories their grammar needs. - Dates use ICU
{date, date, yMMMMd}or theformatattribute in the placeholder.
Use in widgets
AppLocalizations.of(context)caches per locale. Don't call it inside a tight loop — hoist.- Interpolate with the generated method, not
${l10n.greeting} $name. The generated plural/gender logic fires only through the method.
Runtime locale switching
Store the user-selected locale in settings, expose via a ChangeNotifier (or your repository of choice), and hoist into MaterialApp.locale:
System locale by default; override only when the user explicitly picks one.
Numbers, currencies, dates
Avoid string concatenation. Use intl:
Consider registering a single IntlService in GetIt that wraps these so the formatting is testable and consistent.
CI gates
Fail CI when:
- A new key exists in
app_en.arbbut is missing in any translated file (or vice versa). - A placeholder list diverges between locales.
flutter gen-l10nproduces a diff (translations out of sync with generated code).
A small tool/check_l10n.dart reads every .arb, compares key sets, and exits non-zero on drift.
RTL
Arabic, Hebrew, Persian — MaterialApp flips layout automatically when the locale's Directionality is rtl. Custom widgets with explicit Alignment.centerLeft or EdgeInsets.only(left:) break in RTL; use AlignmentDirectional.centerStart and EdgeInsetsDirectional.only(start:).
Testing
Hard nos
- No raw string literals in UI widgets. Everything user-visible through
l10n. - No
'${l10n.greeting} $name'— use a proper key with a placeholder. - No locale detection via
Platform.localeNamein UI layers — useLocalizations.localeOf(context). - No committing an out-of-date
generated/l10n/...— regenerate. - No missing placeholders in translated files. CI should catch this.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingflutter/.claude/skills/localization-arb/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. 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
[](https://verified-skill.com/skills/dimitriremoiville/cc-mobile/localization-arb)