> Documentation index: [llms.txt](https://www.i18next.com/llms.txt). Every page is also available as Markdown at its URL plus `.md`.

# Build it with your agent

Two conversations as they could go: you say one sentence, your agent builds on i18next, and the texts end up in plain files in your repo.

**You** · Tue 09:12

Make my bakery’s website available in German and French.

**Your agent** · 09:15

Done. I used **i18next**, an open-source library for translations: every text now lives in one plain file per language, not inside the pages.

1. Moved 38 texts out of the pages into `locales/en/common.json`
2. Wrote `locales/de/common.json` and `locales/fr/common.json`
3. One address per language, `/en/` `/de/` `/fr/`, with hreflang links between them
4. A language switcher in the header
5. Ran `i18next-cli status`: no text is missing in any language

Worked for 3 minutes · 14 files changed

Here is the home page. Try the switcher, or change the number of loaves: French puts 0 in the singular, English and German in the plural.

A week later

**You** · Mon 17:40

Can our shop assistant reword the French tagline herself? She is from France.

**Your agent** · 17:40

Yes. It is one line of `locales/fr/common.json`. She can change it there, on GitHub or in any editor, or ask any agent to do it. If she would rather not touch files, a translation management tool can sit on top of the same files.

locales/fr/common.json

```
{
  "tagline": "Pain au levain et viennoiseries, cuits chaque matin.",
  "loaves_one": "{{count}} pain de seigle pour demain",
  "loaves_other": "{{count}} pains de seigle pour demain"
}
```

**You** · Wed 10:04

Add German to our React app.

**Your agent** · 10:10

Done. I set up **i18next** with react-i18next and moved the texts out of the components into one file per language.

1. Ran `i18next-cli instrument`: 214 texts in 31 components now go through `t()`
2. Ran `i18next-cli extract`: all keys in `locales/en/translation.json`
3. Wrote `locales/de/translation.json`
4. A language switcher in the settings, the browser language as the default
5. Added `i18next-cli status` to CI: the build fails when a German text is missing

Worked for 6 minutes · 38 files changed

Here is the invoice screen in both languages. Select a few invoices: each language gets its own plural form, and amounts and dates follow its format.

A week later

**You** · Wed 16:20

Add an export button to the invoice list.

**Your agent** · 16:24

Done. The button and its two messages are in English and German from the start: I added the keys to both files in the same change, and CI checked that no language is missing one.

3 keys added · locales/en and locales/de

```
// locales/en/translation.json
+ "export": "Export as CSV",
+ "exportDone_one": "{{count}} invoice exported",
+ "exportDone_other": "{{count}} invoices exported"

// locales/de/translation.json
+ "export": "Als CSV exportieren",
+ "exportDone_one": "{{count}} Rechnung exportiert",
+ "exportDone_other": "{{count}} Rechnungen exportiert"
```

passed `i18next-cli status` · de 217/217

## What do you want to tell your agent?

Pick the sentence closest to yours. Each one leads to a prompt you can paste, and to the way your agent builds it.

- [Build me a website in two or more languages. New site · Astro or Next](https://www.i18next.com/with-your-agent/build-multilingual-site)
- [Add a second language to my site or app. All texts sit in the code today](https://www.i18next.com/with-your-agent/add-a-second-language)
- [Let my client change the texts without a developer. The people who write do not code](https://www.i18next.com/with-your-agent/client-changes-texts)
- [Keep the other languages current when the English changes. Translations fall behind](https://www.i18next.com/with-your-agent/keep-languages-current)
- [Make each language version findable. One address per language, hreflang](https://www.i18next.com/with-your-agent/findable-languages)

Writing the code yourself, or checking what your agent wrote? [The docs](https://www.i18next.com/introduction)
