flutter-localization
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)
Best use case
flutter-localization is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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)
Teams using flutter-localization should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/flutter-localization/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How flutter-localization Compares
| Feature / Agent | flutter-localization | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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)
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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
```text
# 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](references/REFERENCE.md).
## Related Topics
idiomatic-flutter | widgetsRelated Skills
vscode-ext-localization
Guidelines for proper localization of VS Code extensions, following VS Code extension development guidelines, libraries and good practices
i18n-localization
Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.
flutter-animations
Comprehensive guide for implementing animations in Flutter. Use when adding motion and visual effects to Flutter apps: implicit animations (AnimatedContainer, AnimatedOpacity, TweenAnimationBuilder), explicit animations (AnimationController, Tween, AnimatedWidget/AnimatedBuilder), hero animations (shared element transitions), staggered animations (sequential/overlapping), and physics-based animations. Includes workflow for choosing the right animation type, implementation patterns, and best practices for performance and user experience.
flutter-expert
Use when building cross-platform applications with Flutter 3+ and Dart. Invoke for widget development, Riverpod/Bloc state management, GoRouter navigation, platform-specific implementations, performance optimization.
flutter-dart-code-review
库无关的Flutter/Dart代码审查清单,涵盖Widget最佳实践、状态管理模式(BLoC、Riverpod、Provider、GetX、MobX、Signals)、Dart惯用法、性能、可访问性、安全性和整洁架构。
ios-localization
Standards for String Catalogs, L10n, and Asset Management. Use when adding multi-language support using iOS String Catalogs or L10n workflows. (triggers: **/*.stringcatalog, **/*.xcassets, **/*.strings, LocalizedStringResource, NSLocalizedString, String(localized:))
flutter-widgets
Principles for maintainable UI components. Use when building, refactoring, or reviewing Flutter widget implementations for maintainability. (triggers: **_page.dart, **_screen.dart, **/widgets/**, StatelessWidget, const, Theme, ListView)
flutter-security
OWASP Mobile security standards for Flutter. ALWAYS consult when storing data, making network calls, handling tokens/PII, or preparing a release build — not just dedicated security tasks. (triggers: lib/infrastructure/**, pubspec.yaml, secure_storage, obfuscate, jailbreak, pinning, PII, OWASP)
flutter-riverpod-state-management
Reactive state management using Riverpod 2.0 with code generation. Use when managing state with Riverpod providers or using riverpod_generator in Flutter. (triggers: **_provider.dart, **_notifier.dart, riverpod, ProviderScope, ConsumerWidget, Notifier, AsyncValue, ref.watch, @riverpod)
flutter-retrofit-networking
HTTP networking standards using Dio and Retrofit with Auth interceptors. Use when integrating Dio, Retrofit, or API auth interceptors in Flutter. (triggers: **/data_sources/**, **/api/**, Retrofit, Dio, RestClient, GET, POST, Interceptor, refreshing)
flutter-performance
Optimization standards for rebuilds and memory. Use when optimizing Flutter widget rebuilds, reducing memory usage, or improving rendering performance. (triggers: lib/presentation/**, pubspec.yaml, const, buildWhen, ListView.builder, Isolate, RepaintBoundary)
flutter-notifications
Push and local notifications for Flutter using FCM and flutter_local_notifications. Use when integrating push or local notifications in Flutter apps. (triggers: **/*notification*.dart, **/main.dart, FirebaseMessaging, FlutterLocalNotificationsPlugin, FCM, notification, push)