---
source: https://cli.eloqnt.dev/docs/cli/translate
docs_index: https://cli.eloqnt.dev/llms.txt
---

# eloqnt translate

Fill in missing translations across your target locales.

A run translates every string that doesn't have a translation yet, leaving existing translations untouched. Before translating, it's recommended to run [`eloqnt review`](https://cli.eloqnt.dev/docs/cli/review) first, so mistakes in source strings don't spread out.

```console
$ eloqnt translate

✔  Context enrichment complete
✔  Styleguides loaded (global, es)
✔  Translated de, es via eloqnt/engine (hosted)
✔  Post-translation checks done

messages/
  de.json  2 translated
  es.json  2 translated

✔ Project fully translated
```

Each run applies the following steps:

1. If [`srcPath`](https://cli.eloqnt.dev/docs/configuration#srcPath) is configured, source strings are enriched with contextual information from their call sites about how they're used
2. All applicable [styleguides](https://cli.eloqnt.dev/docs/styleguides) are loaded to steer tone, terminology, and consistency
3. Post-translation checks guard against translation errors and will retry rejected translations automatically

## Values that aren't text

Booleans and numbers in a messages file aren't translatable, so they're never sent for translation. A target locale keeps its own value if it has one. If it doesn't, the value is copied over from the source locale as-is. When a copied value is locale-specific (e.g. a text-direction flag), correct it once in the target file and later runs will keep your value.

## Flags

| Flag | Type | Description |
| --- | --- | --- |
| `--id` | `string` | (Re-)translate these message ids (comma-separated) |
| `--locale` | `string` | Restrict to these target locales (comma-separated) |
| `--config` | `string` | Path to the eloqnt config file (defaults to .eloqnt/config.{ts,mts,js,mjs}) |
| `--json` | `boolean` | Output the result as JSON |

---

For an index of every eloqnt/cli documentation page, see [https://cli.eloqnt.dev/llms.txt](https://cli.eloqnt.dev/llms.txt).
