# i18n JSON Translation

Translate i18n string files (JSON, ARB, .strings, strings.xml, YAML, XLIFF, PO) without breaking {placeholders}, tags or plurals.

Send a string file, get it back translated in the same format. Placeholders, HTML tags and ICU messages are masked before translation and checked after; plural forms are filled for each target language's CLDR categories (Romanian gets one/few/other, Polish one/few/many/other). Keys that fail validation are retried, then left in the source language and not charged.

- Localization that cannot break your app: placeholders, HTML tags and ICU messages are masked before translation and checked after.
- Plural forms are filled for each language's own categories: Romanian gets one/few/other, Polish one/few/many/other.
- Keys that fail validation are left in the source language, listed in a report and not charged.

## Calls

### `POST https://readymadeapi.com/v1/localise`

Translate an i18next JSON, ARB, iOS .strings, Android strings.xml, Rails YAML, XLIFF 2 or gettext PO file into up to 10 languages, with a validation report.

- Price: $0.0006 per string × language, up to 400 per call
- MCP tool: `localiser_localise`
- Answers in the same call.

Request:

```json
{
  "content": "{\n  \"welcome\": \"Welcome back, <b>{{name}}</b>!\",\n  \"messages_one\": \"You have {{count}} new message\",\n  \"messages_other\": \"You have {{count}} new messages\"\n}",
  "format": "i18next-json",
  "targets": ["ro", "pl"],
  "tone": "informal"
}
```

Answer:

```json
{
  "files": [
    {
      "lang": "ro",
      "content": "{\n  \"welcome\": \"Bine ai revenit, <b>{{name}}</b>!\",\n  \"messages_one\": \"Ai {{count}} mesaj nou\",\n  \"messages_few\": \"Ai {{count}} mesaje noi\",\n  \"messages_other\": \"Ai {{count}} de mesaje noi\"\n}"
    },
    {
      "lang": "pl",
      "content": "{\n  \"welcome\": \"Witaj ponownie, <b>{{name}}</b>!\",\n  \"messages_one\": \"Masz {{count}} nową wiadomość\",\n  \"messages_few\": \"Masz {{count}} nowe wiadomości\",\n  \"messages_many\": \"Masz {{count}} nowych wiadomości\",\n  \"messages_other\": \"Masz {{count}} nowa wiadomość\"\n}"
    }
  ],
  "report": {
    "keys": 2,
    "translatable": 2,
    "translated": {
      "ro": 2,
      "pl": 2
    },
    "failed_keys": {
      "ro": [],
      "pl": []
    },
    "length_overflows": {
      "ro": [],
      "pl": []
    },
    "plural_categories": {
      "ro": ["one", "few", "other"],
      "pl": ["one", "few", "many", "other"]
    },
    "retried_keys": 1,
    "placeholders_preserved": true,
    "icu_valid": true,
    "target_errors": {}
  }
}
```

## Limits

- Up to 400 strings × languages per call, and up to 10 target languages.
- A string file may be up to 512 KB.

## Questions

**Why not a plain translation API?**

A plain translator will translate {count} or drop a closing tag, and the bug ships. This checks every string after translating it.

**How is it billed?**

Per string per target language. A file of 100 strings into 3 languages is 300 units; up to 10 languages per call.

**May I send personal data?**

No. Strings go to a language model at an outside provider, on a route with zero data retention switched on; do not put personal data in them.

## Using it

- Send `Authorization: Bearer <key>` and a JSON body. Keys and credit: https://readymadeapi.com/account
- Every answer carries `X-Request-Id`, `X-Units` and `X-Charged-Usd`.
- An error is a JSON problem with a `title` to act on and a `detail` in plain words; nothing is charged for it.
- Full schema: https://readymadeapi.com/openapi.json
