alirezarezvani/claude-skills / engineering/i18n-localization/skills/i18n-localization
i18n-localization
FlaggedUse when adding UI text, adding or shipping a language, reviewing translation files, or building i18n into an app. Checks missing keys, placeholders and CLDR plural forms with locale_sync.py, finds hardcoded strings with hardcoded_strings.py, and builds a pseudo-locale with pseudo_localize.py.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.1 KB |
| assets/i18n-allow.example | other | 283 B |
| assets/i18n-gate.yml | config | 660 B |
| references/layout_rtl_pseudo.md | markdown | 3.6 KB |
| references/plurals_and_messages.md | markdown | 5.4 KB |
| references/string_routing_and_formatting.md | markdown | 4.3 KB |
| scripts/hardcoded_strings.py | script | 19.9 KB |
| scripts/locale_sync.py | script | 36.2 KB |
| scripts/pseudo_localize.py | script | 9.3 KB |
references/layout_rtl_pseudo.md
View on GitHub# Layout, right-to-left and pseudo-localization
Confidence: π’ spec or vendor documentation, π‘ practice.
## 1. Text grows, and short strings grow most
IBM's globalization guidelines, as republished by the W3C, give the size of
translated text relative to the English source [1]: up to 10 characters 200-300%,
11-20 180-200%, 21-30 160-180%, 31-50 140-160%, over 70 about 130%. (The 51-70 row
reads "151-170%" in the W3C copy, which breaks the pattern; treat it as roughly
135%.) German and Finnish run long, CJK runs short but taller. π’
`pseudo_localize.py` pads by the lower bound of that growth: +100% up to 10
characters, +80%, +60%, +40%, +35%, +30% above 70. A "Save" button that survives
the pseudo-locale survives German.
Design consequences π‘: no fixed-width buttons or tabs around text, allow two
lines in table headers, never truncate without a tooltip or `title`, and leave
room in navigation bars.
## 2. Pseudo-localization
A pseudo-locale is generated, not translated, so it costs nothing and can run
before the first translator is hired [2][3].
| Pseudo-locale | Tests | Convention |
|---|---|---|
| `en-XA` accented + expanded + bracketed | untranslated strings stay plain ASCII; clipping; concatenation shows as `[[a]] [[b]]` | Android pseudolocale [2] |
| `ar-XB` mirrored (RLO-wrapped) | RTL layout, mirrored icons, bidi of embedded numbers | Android pseudolocale [2] |
Microsoft's equivalents are `qps-ploc` and `qps-plocm` [3]. Register the pseudo
locale only in development and QA builds.
Reading a pseudo-localized screen: plain English = hardcoded string; `[[...` with
no closing `]]` = truncation; two bracket pairs in one label = concatenation;
`{{name}}` visible = placeholder broken in the source.
## 3. Right-to-left
- Set `dir="rtl"` and `lang` on `<html>` for ar, he, fa, ur [4]. π’
- Use CSS logical properties (`margin-inline-start`, `padding-inline-end`,
`inset-inline-start`, `text-align: start`) instead of left/right [5]. π’
- Mirror directional icons (back/forward arrows, progress), not universal ones
(play button, checkmark, clock, logos). π‘
- Wrap user-generated or mixed-direction content in `<bdi>` or `dir="auto"` so a
Hebrew username does not reorder the punctuation around it [4][6]. π’
- Numbers stay left-to-right inside RTL text; phone numbers and code too. π’
## 4. Release checklist
1. `locale_sync.py` exits 0, or every remaining warning is accepted by name.
2. `hardcoded_strings.py` exits 0 on the changed folders.
3. The app was clicked through in `en-XA` (and `ar-XB` if an RTL locale ships).
4. Dates, numbers and currency show the target locale's separators.
5. The longest language was checked on the narrowest supported screen.
6. Fallback: a deleted key renders the source text, not the key name.
## Sources
1. W3C Internationalization, *Text size in translation* (IBM table). https://www.w3.org/International/articles/article-text-size/
2. Android Developers, *Test your app with pseudolocales*. https://developer.android.com/guide/topics/resources/pseudolocales
3. Microsoft Learn, *Pseudo-localization* (globalization testing). https://learn.microsoft.com/en-us/globalization/methodology/pseudolocalization
4. W3C Internationalization, *Structural markup and right-to-left text in HTML*. https://www.w3.org/International/questions/qa-html-dir
5. MDN Web Docs, *CSS logical properties and values*. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values
6. W3C Internationalization, *Inline markup and bidirectional text in HTML*. https://www.w3.org/International/articles/inline-bidi-markup/
7. Material Design, *Bidirectionality*. https://m2.material.io/design/usability/bidirectionality.html
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |