Localization
Add multiple languages with locale folders and translated navigation labels.
Use localization when you want readers to switch languages without leaving the same docs project.
Keep the default language at the root. Add one folder for each translated language.
Project Structure
Use the root pages for your default language. Mirror the same page names in each locale folder.
Enable The Language Switcher
Add languages under navigation:
{
"navigation": {
"languages": {
"default": "en",
"items": ["en", "fr", "nl", "jp"]
},
"tabs": [
{
"id": "docs",
"label": {
"en": "Docs",
"fr": "Documentation",
"nl": "Documentatie",
"jp": "γγγ₯γ‘γ³γ"
},
"content": ["index", "getting-started", "cli"]
}
]
}
}
Translate Navigation Labels
Translate every label and title that appears in navigation.
{
"title": {
"en": "Getting Started",
"fr": "Bien demarrer",
"nl": "Aan de slag",
"jp": "γ―γγγ«"
}
}
Show Pages Only In Some Languages
Use the languages field when a page or group should only appear in some languages.
{
"page": "enterprise-rollout",
"title": {
"en": "Enterprise Rollout",
"fr": "Deploiement entreprise"
},
"languages": ["en", "fr"]
}
Writing Tips
Keep page names the same across languages.
Translate navigation labels and page titles, not just body text.
Start with your most important pages.
Use code groups for programming languages and locale folders for human languages.
If only a few pages are translated, keep the language list small. It is better to support a few pages well than many pages halfway.
A Good Rollout Plan
Publish the full docs set in English.
Translate the homepage, CLI guide, and getting-started path into one additional language.
Add translated navigation labels.
Translate deeper guides after you know which pages people use most.