internationalization

Solid

How the Flutter app localizes — ARB files with English as the template, l10n.yaml config, the genarb → arb_translate → gen-l10n pipeline, GetMaterialApp delegate wiring, and L10n.of(context) usage. Auto-applies when editing ARB files or l10n.yaml.

Data & Documents 1 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
10
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Internationalization (l10n) English is the source of truth; every other locale is generated from it. UI code never hardcodes a string — it reads from the generated localizations. ## l10n.yaml Controls generation. ARB sources live in `lib/config/lang/`, English is the template, output goes to a directory excluded from analysis: ```yaml arb-dir: lib/config/lang # source ARB files template-arb-file: app_en.arb # English is the template output-localization-file: app_localizations.dart output-dir: lib/_shared/l10n/ # generated (excluded from analysis) nullable-getters: false preferred-supported-locales: [ en, hi, gu, mr, bn, ta, te, kn, ml, or, as, pa ] ``` `flutter.generate: true` must be set in `pubspec.yaml` for `gen-l10n` to run. ## ARB files Author only `app_en.arb`. Each key pairs with an `@key` metadata entry carrying a `description` (and `placeholders` for interpolation): ```json { "@@locale": "en", "welcomeMessage": "Welcome to the app", "@welcomeMessage": { "description": "Greeting shown on the home screen" }, "greeting": "Hello, {name}!", "@greeting": { "description": "Personalised greeting", "placeholders": { "name": { "type": "String" } } } } ``` Add new strings to `app_en.arb` only — the other locales are filled by translation (below). Always write a `description`; it's the context the translator sees. ## The pipeline Adding or changing a string runs three steps: ```text genarb # create empty app_<locale>.arb for any n...

Details

Author
virajp
Repository
virajp/ai-plugins
Created
2 months ago
Last Updated
yesterday
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category