| name | localize |
| description | Add localized strings to ARB files with proper grouping, naming, placeholders, and code generation. Use when adding translations or localized text to the app. |
Localization Workflow
Add new localized strings to the project following established conventions.
For naming conventions, grouping, placeholder format, and access in code, see localization-process.
Localization Files
ARB files are located in the modules/ui module:
- Template ARB: the file configured as
template-arb-file in modules/ui/l10n.yaml (currently app_ru.arb) — add new keys here first
- Additional languages (if configured): any other ARB files in the same directory (e.g.,
app_en.arb) — must also be updated with translations
Metadata annotations (@key with placeholders) only need to be in the template file.
Step-by-Step Process
1. Create a Segment (if new feature/screen)
Each feature or screen gets its own segment — a JSON object prefixed with @segment:
"@segmentOtpVerify": {
"---------": "---------",
"description": "OTP verification screen strings"
},
2. Add Keys and Placeholders
Follow the naming and placeholder conventions from the localization-process rule.
3. Run Code Generation
make gen-l10n
Alternatively, make gen-ui also runs l10n generation as part of the full UI module codegen.