---
name: localise-app
description: Make an app ready to ship in another language. Run the free local check, fix what it finds in the code, the translations and the store listing, and run it again until the verdict is complete_static. Use for "localise this app for Germany", "is this app ready for Japan", "add Spanish", i18n and l10n work on iOS, Android, Flutter, React Native and web apps.
---

# Localise an app

## The outcome, and the command that proves it

The app is ready for the target markets when this command exits with code 0:

```bash
npx threefold check . --markets de-DE,ja-JP
```

Its first line then starts with `complete_static` (every static check passed) or `complete` (the runtime checks passed too). Use the locale tags of the markets the person named. The command is free. It reads the files on this machine, needs no account and sends nothing.

| Exit code | First word | Meaning |
|---|---|---|
| 0 | `complete`, `complete_static` | Done. `complete_static` is the target of this skill |
| 1 | `incomplete` | One check or more fails. Fix and run again |
| 2 | (an error on stderr) | Wrong option or unreadable path. Fix the command, not the app |

**Never report a pass that the command did not print.** Do not write "ready" or "compliant" from your own reading of the files.

## The loop

1. **Run** the command with `--json` and read the report:
   - `verdict`, and `market_verdicts` with one verdict for each market.
   - `checks[]`: each has `id`, `status`, `severity` and `findings[]`. A finding has `file`, `line`, `message` and `fix`.
   - A check with `listed_under` reports the same places as another check. Fix the other check, and both pass.
2. **Pick one failing check** (`status: "fail"`): take `severity: "blocker"` before `error`. Fix **every** finding of that check, in the files, with the table below. One check at a time: a fix often moves lines or removes findings of other checks.
3. **Run again.** If the check still fails, read its new findings. They are the truth, not your memory of the edit.
4. **Repeat** until the exit code is 0. Then look at the checks with `status: "warn"`: fix them, or tell the person which you left and why.
5. **Report** the last command, its first line, and each file you changed. Then do "When the verdict is `complete_static`" below.

Without `--json` the command prints a summary of 40 lines or fewer for a person: the verdict, each failing check with its count and its first findings as `file:line`. `--full` lists every finding with its fix.

## How to fix each class of finding

| Check | The defect | The fix |
|---|---|---|
| `CHK-CORE-001`, `CHK-WEB-002` | Text for the user is written in the code | Move the text to the base locale file under a new key, and read it through the project's own lookup (`t("key")`, `String(localized:)`, `stringResource`, `AppLocalizations`). Then add the key to every target locale, translated |
| `CHK-CORE-002`, `CHK-WEB-001`, `CHK-AND-002`, `CHK-FLT-001`, `CHK-IOS-001` | A locale file or a key is missing for a market, or a String Catalog entry is not `translated` | Add the file or the key in the layout the project already uses. Translate the text yourself for the market's variant (es-MX is not es-ES). Do not copy the base text |
| `CHK-CORE-004` | A placeholder in the translation differs from the base (`{count}`, `%@`, `%d`) | Use the base string's placeholders, with the same names and types. Translate only the words |
| `CHK-CORE-005`, `CHK-AND-003` | A plural form that the language needs is missing | Add each category the finding names (`one`, `few`, `many`, `other`) |
| `CHK-CORE-003` | A key is in a target locale and not in the base | Delete it, or add it to the base if the code uses it |
| `CHK-CORE-008`, `CHK-CORE-009` | A currency sign, number or date is built by hand | Use the platform formatter with the user's locale: `Intl.NumberFormat(locale, { style: "currency", currency })`, `Intl.DateTimeFormat(locale)`, `NumberFormatter`, `NumberFormat`. The currency is the one the price is in: if the code does not say, ask the person |
| `CHK-CORE-010`, `CHK-VAR-SPANISH` | Text is in the wrong language, or in the wrong regional variant | Rewrite the strings the finding names for that market |
| `CHK-WEB-003`, `CHK-WEB-004` | `<html>` has no `lang`, or the `hreflang` links are not complete | Set `lang` from the active locale (in a static HTML file, the language of that file). Add one alternate link for each locale and `x-default` |
| `CHK-IOS-002`, `CHK-IOS-003`, `CHK-IOS-004`, `CHK-AND-001`, `CHK-AND-004`, `CHK-FLT-002`, `CHK-RN-001` | A platform file is broken or not configured | Follow the finding's `fix`. It names the file and the setting |
| `CHK-STORE-LIMITS`, `CHK-STORE-SCREENSHOTS` | A store listing field for the market is missing or too long (App Store: title 30, subtitle 30, keywords 100 characters. Google Play: title 30, short description 80), or a screenshot set is missing | Add or shorten the field in `fastlane/metadata/<locale>/`. Tell the person which screenshots are missing: do not invent images |

Rules for every fix:

- **Fix the defect, not the report.** Do not use `--exclude-paths` to hide a failing file, and do not delete user-facing text to remove a finding. `--exclude-paths` is only for folders that are not the app's interface, such as generated data, and the person must agree.
- **A finding can be wrong.** If the text is a brand name, a code sample or test data, or a correct translation is reported as the wrong language, do not "fix" it. Leave it, go on with the other checks, and report it to the person as a likely false positive with its check id and `file:line`. If only such findings are left, stop: the verdict stays `incomplete`, and you say so. Do not change correct text to get exit code 0.
- Follow the project's existing i18n library and file layout. Do not add a second one.

## When the verdict is `complete_static`

Say what was not verified. These need the person:

- **Runtime checks did not run** (`CHK-RUN-…`): clipped or overlapping text shows only in a running app. Ask the person to look at the longest screens in each language.
- **Translation quality:** the check proves that a translation exists and keeps its placeholders. It does not prove that the wording is good. Name the strings you translated, so that a speaker of the language can read them.
- **Legal review items:** run the command once more with `--legal` and show the person each item it lists (for example the German Impressum, the Japanese Tokushoho page). They are for a lawyer to read. **Never say the app is legally compliant.** This is not legal advice.

## Optional: paid steps with a threefold account

Everything above is free and needs no account. The steps below use threefold's data or compute. Do them only when the person asks, and say that they need an account at [threefold.eco](https://threefold.eco). They use the threefold MCP tools ([agent tools](https://threefold.eco/docs/agent-tools/)).

- **Optional, paid: compare the store listing with the top apps in the market.** Call `check` with `what: "listing"`, the market, and the listing's fields. It returns the limits, the dialect findings and benchmarks from the top apps. For the words that the top apps in the category use, call `market` with `focus: "language"`.
- **Optional, paid: translate a web page or a CMS document** with `npx threefold localise-page <file> --variant es-MX`. It needs a login with the `analysis` scope, and the page's text goes to the model supplier. Read the QA report and each retained source node before you publish.
- **Optional, needs an account: keep the report.** `npx threefold check . --markets <tags> --upload` stores the report (never the code) in the person's workspace and prints its URL. It needs an API key (`npx threefold login --key <api-key>`).
