appforge reference for internationalizing a mini app (English by default, French second) with no library, using defineStrings and pick; plus a procedure to translate an existing app in parallel.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of I18n?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/mrasoahaingo-i18n)
---
name: i18n
description: appforge reference for internationalizing a mini app (English by default, French second) with no library, using defineStrings and pick; plus a procedure to translate an existing app in parallel.
disable-model-invocation: true
---
# Languages: English by default, French second
Fastkind was translated on day 2, which took 4 agents and a pass over every screen. A new app is born bilingual: the mechanics are set up in `scaffold`.
## Mechanics
Apps generated by `new-app.mjs` already have the mechanism and a `docs/I18N.md` to fill in (tone, glossary). The essentials:
- **Foundation**: `packages/core/src/i18n.ts` (`defineStrings`, `pick`, `setLocale`, `getLocale`, `getLocaleTag`, `withLocale`, `resolveLocale`). No library.
- **Strings live next to the code** that displays them, in `strings.ts`, shaped `{ en, fr }`. `fr` has exactly the shape of `en`, and the compiler checks it. A string that depends on a value is a function: each language handles its own plurals and word order.
- **Read at render time**: `pick(strings)` inside the component, never at module level.
- **Mobile**: the language is chosen in `src/i18n/init.ts`, imported first by `_layout.tsx`. `EXPO_PUBLIC_LOCALE=fr` forces a language. The app name and permission texts live in `locales/{en,fr}.json` (`expo-localization` plugin).
- **Dates and numbers**: `getLocaleTag()`, never a hard-coded `'fr-FR'`.
- **Widget and Live Activity**: strings prepared by the core and passed as props. The widget's **default props stay a literal** in the widget file (English placeholder): its isolated bundle runs nothing imported, and a function call there breaks the EAS build.
- **Website**: English at the root, French under `/fr`, language header in `proxy.ts`.
- **Store listing, screenshots, legal pages**: always both languages.
## Tone
One language sets the tone and the other translates the meaning, not the words: warm, direct, second person. The words banned by the app's tone are listed **in both languages** in `docs/I18N.md`, and checked with `grep` during the audit.
## Translating an existing app
1. Inventory: `grep` displayed strings (`Text`, `title=`, `accessibilityLabel`, `Alert`, notifications, widget).
2. Split by non-overlapping folders across 3 or 4 agents. In Fastkind:
- `packages/core`;
- mobile part A;
- mobile part B;
- web and notification language.
Shared prompt: the mechanics above, the glossary, "touch only your scope".
3. Review the glossary end to end, then check the main screens in both languages with screenshots.
## Done when
- No displayed string remains outside a `defineStrings`: the control `grep` comes back empty.
- Every main screen captured in English and in French.
- `pnpm check` green.