agentsclimarketplace

Flutter localization

Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/flutter-localization

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill flutter-localization

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Standards for multi-language support using easy_localization with CSV or JSON. Use when adding localization or multi-language support to Flutter apps. (triggers: **/assets/translations/*.json, **/assets/langs/*.csv, main.dart, localization, multi-language, translation, tr(), easy_localization, sheet_loader)

SKILL.md

1.9 KB, as published. Nobody here has run it

Localization

Priority: P1 (STANDARD)

Consistent multi-language support using easy_localization.

Format Selection

  • CSV (Recommended for teams with translators):
    • Non-technical editors can update easily
    • Native Google Sheets compatibility via sheet_loader_localization
    • Store in assets/langs/ (common convention)
  • JSON (Developer-friendly):
    • Nested structure support (e.g., items_count.zero)
    • IDE validation and autocomplete
    • Store in assets/translations/

Both formats work identically with easy_localization.

Structure

# CSV Format (Google Sheets workflow)
assets/langs/langs.csv

# OR JSON Format (nested keys)
assets/translations/
├── en.json
└── vi.json

Implementation Guidelines

  • Bootstrap: Wrap root with EasyLocalization. Always use await EasyLocalization.ensureInitialized().
  • Lookup: Use .tr() extension on strings (e.g., 'welcome'.tr()).
  • Locale: Change via context.setLocale(Locale('code')).
  • Params: Use {} placeholders; pass via tr(args: [...]).
  • Counting: Use plural() for quantities.
  • Sheets Sync: Use sheet_loader_localization to auto-generate CSV/JSON from Google Sheets.

Anti-Patterns

  • Hardcoding: No raw strings in UI; use keys.
  • Manual L10n: Avoid standard Localizations.of; use GetX or easy_localization context methods.
  • Desync: Keep keys identical across all locale files.

Reference & Examples

For setup and Google Sheets automation: See references/REFERENCE.md.

Related Topics

idiomatic-flutter | widgets

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.