---
title: Internationalization
---
# Internationalization
## Locale directories
Every `[[locales]]` entry in `docs/config.toml` with a prefix other than `/`
maps to a same-named directory:
```text
docs/
├── README.md # English (prefix "/")
└── zh/
└── README.md # Chinese (prefix "/zh/")
```
## Locale chrome
Per-locale `navbar`, `footer`, `toc_label`, `prev_label`, and `next_label`
keep the whole UI translated — not just the page bodies.
## Language dropdown
When more than one locale exists, the navbar shows a 🌐 dropdown. Switching
locale keeps the current page when a translation exists and falls back to
the locale home otherwise.
## Adding a locale
1. Add a `[[locales]]` entry with `prefix = "/fr/"`.
2. Create `docs/fr/README.md`.
3. Rebuild — no other changes needed.
::: warning
Routes are shared across locales: `/guide/x.html` and `/zh/guide/x.html`
are two pages from two files. Untranslated pages fall back to the locale
home when switching languages.
:::