flutter-localization

A guide for translating and formatting text in Flutter apps for different languages and regions. It covers translation files, plural forms, right-to-left languages, changing languages while the app runs, and dates, numbers, and currencies.

In plain words
What is it for?
Use it to add translation keys and locale files, switch languages, support right-to-left layouts, create plural messages, and format dates, numbers, and currencies.
Why use it?
It prevents user-facing text from being hardcoded in the app and keeps language changes consistent across screens. It also helps avoid incorrect plural, direction, date, number, or currency formatting.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/yendangn/flutter-app-builder/flutter-localization
Any agent
npx skills add yendangn/flutter-app-builder --skill flutter-localization
Clone the repo
git clone --depth 1 https://github.com/yendangn/flutter-app-builder

Made for: Claude Code, Codex.

Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 560 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00065 $0.00560
Opus 5 $0.00032 $0.00280
Sonnet 5 $0.00013 $0.00112
Haiku 4.5 $0.00006 $0.00056

Measured 3d ago against content hash 65ba3b1b9dba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

flutter-localization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/flutter-localization/SKILL.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flutter Localization

Full reference: template.md

Key rules

  • LocalizationService is the app-owned interface. Never import flutter_localization outside localization_service_impl.dart.
  • All user-facing strings live in assets/i18n/<locale>.json. No hardcoded strings in widget or cubit code.
  • Translation key access: context.tr('key') in build methods (auto-rebuilds on locale change via context.watch<LocaleCubit>()). Never call getIt<LocalizationService>().translate() directly in widgets — use context.tr().
  • Plural support: keys are key_zero, key_one, key_other. Call localizationService.plural('key', count).
  • Dynamic locale switch: LocaleCubit.setLanguage(locale)safeEmit(locale) → all widgets calling context.tr() rebuild (via context.watch<LocaleCubit>()). Provide LocaleCubit at the app root. MaterialApp rebuilds via BlocBuilder<LocaleCubit, Locale>.
  • RTL: LocalizationService.isRtl → use Directionality widget or TextDirection.rtl for affected widgets.
  • Date/number/currency formatting: use AppFormatter (wraps intl) — never DateFormat(...) directly in widgets.
  • Validator error messages must use localization keys, never raw strings.
  • Add new locales: add <locale>.json, register locale in LocalizationServiceImpl, declare in MaterialApp.router.

Files

assets/i18n/
  en.json    ← source of truth for keys
  vi.json    ← secondary locale
lib/src/core/localization/
  localization_service.dart          ← interface
  localization_service_impl.dart     ← only file importing flutter_localization
  locale_cubit.dart                  ← Cubit<Locale> — drives reactive locale switching
  app_formatter.dart                 ← date/number/currency formatters (wraps intl)

Co-load with

  • flutter-diLocalizationService + AppFormatter + LocaleCubit registration
  • flutter-storage — persist selected locale in KeyValueStore
  • flutter-theme — locale affects text direction
  • flutter-base-classesLocaleCubit uses SafeEmitMixin

Read the full file on GitHub · 41 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 41 lines · 65 tokens per session scan A 65ba3b1b9dba

Subscribe to this mod's changes

flutter-localization is a skill published in the GitHub repository yendangn/flutter-app-builder (5 stars, last pushed 2mo ago), licensed MIT. It adds 65 tokens to every session and 560 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

dsh-translate-docs

Manually run the extended DeepSeek Harness bilingual-document workflow, including generated briefings, delegated prose translation, whole-document translation, and scoped pairing verification.

deepseek-ai/deepseek-harness · 37 tokens

i18n-localization

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

vudovn/ag-kit · 27 tokens

translate-skill

将 mattpocock/skills 的内容翻译、刷新或复核到简体中文本地化仓库 vinvcn/mattpocock-skills-zh-CN 时使用这个项目级 skill。适用于 skill files、README content、CLAUDE.md、CONTEXT.md、docs,以及其他需要保留行为关键 identifiers 的上游用户可见内容。.

vinvcn/mattpocock-skills-zh-CN · 84 tokens

seedance-vocab-ja

This skill should be used when the user asks for Japanese Seedance 2.0 prompt wording, Japanese cinematic vocabulary, or translation of camera, lighting, action, VFX, audio, and production terms into Japanese.

Emily2040/seedance-2.0 · 50 tokens

asc-subscription-localization

Bulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 resources. Use when filling or updating subscription/IAP names and descriptions without App Store Connect UI work.

rorkai/app-store-connect-cli-skills · 60 tokens

harden

Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready.

childrentime/reactuse · 32 tokens