# Machine Translation

> The Machine Translation is automatic translation of text from one language to another by software.

## Is machine translation good enough for my app?

The automatic translation of text by neural models, including LLMs. Fast and cheap for drafts and large volumes, but terminology, tone and placeholders must be checked by a native speaker before publishing.

- Topic: Internationalization
- Type: technology

## Example

Wrong:

```text
Translate to German:
Hello {name}, you have {count} new messages
```

Right:

```text
Translate the JSON values into German (de-DE).
Keep keys, {placeholders} and HTML tags unchanged.
Use the informal 'du'. Follow the glossary below.
Return valid JSON only.
{"greeting": "Hello {name}, you have {count} new messages"}
```

Telling the model what to keep, which tone to use and what to return stops it translating placeholders or adding extra text.

## Common mistakes

- Publishing machine-translated legal or payment texts without human review.

## Key points

- Placeholders like '{name}' and HTML tags remain unchanged in translated strings.
- A glossary keeps product terms translated consistently.

## Interview questions

### Why does machine translation break placeholders?

The engine sees `{name}` as text and may translate, move or drop it. Protect placeholders and validate them after translation.

### Should I use an LLM or a dedicated translation engine?

LLMs follow instructions on tone, glossary and context well; dedicated engines are faster and more predictable for bulk text. Both need review.

### How do I keep terminology consistent in machine translation?

Give the system a glossary of fixed terms and product names, and check output against it automatically.

## Related cards

- [l10n](https://wonderium.dev/web/l10n.md)
- [LLM](https://wonderium.dev/ai/llm.md)
- [Translation Keys](https://wonderium.dev/web/translation-keys.md)

---

- Level: [Web Platform](https://wonderium.dev/web.md)
- HTML version: https://wonderium.dev/web/machine-translation
- Last updated: 2026-11-25
