solo-i18n

Solid

Use when "add languages", "translate the app", "localization", "i18n", "make it multilingual", or when UI strings are hardcoded and a second language is coming.

AI & Automation 18 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

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

Skill Content

# /i18n Take an app from one language to many, and keep it there. Written after shipping 36 languages in an iOS app; the traps below each cost real time and none of them announce themselves — a missed string looks perfect in English. ## The order of work 1. **Humanize the source language first.** Translating is per-language cost: fixing an English sentence after the fact means re-translating it in every language. `/humanize` on the long copy, then translate. 2. **Extract, don't hunt.** Get the platform's extractor to produce the key list. A grep for quoted strings finds prose and misses everything typed wrong (see the type rule below). 3. **Translate in batches**, machine-first, with a validator that refuses a batch dropping a format specifier or a plural category. 4. **Look at it running**, in a right-to-left language and in a long-word language (German, Finnish). A language that is merely declared is not a language that works. ## The type rule — the one that decides everything **Anything a person reads must be typed as the platform's localizable type, not as a plain string.** | Platform | Right | Wrong, and silent | |---|---|---| | SwiftUI | `LocalizedStringKey`, `LocalizedStringResource` | `let title: String` | | React / Next | `t("key")` from the i18n hook | a bare JSX literal in a prop | | Android Compose | `stringResource(R.string.x)` | a `String` constant | The extractor only sees literals in positions typed as localizable. A view property d...

Details

Author
fortunto2
Repository
fortunto2/solo-factory
Created
7 months ago
Last Updated
today
Language
Shell
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category