InternationalizationAlpha
Serve your documentation in multiple languages with locale-prefixed URLs, translated navigation, and a built-in locale switcher.
Quick Start
Declare your languages in docs.json under navigation.languages:
File Structure
The default locale lives at the root. Every other locale mirrors the tree under a folder named after its language code:
URLs
| Locale | URL pattern | Example |
|---|---|---|
Default | /<slug> (unprefixed) | /quickstart |
Other | /<language>/<slug> | /pl/quickstart, /de/quickstart |
Root / keeps its existing index behavior. The default locale never gets a prefix.
Translating Navigation
Each language can have its own navigation, sidebar, tabs, anchors, and so on. Build them the same way you build the regular navigation, just nested under the matching language entry.
Navigation Catalogs
If your navigation has the same structure in every language, you don't need to repeat the whole tree per locale. Define the structure once at navigation.sidebar, list the locales under navigation.languages, and let the strings come from translation catalogs:
When a language entry omits sidebar/tabs/anchors/etc., it inherits the field from the top-level navigation. Wrap any string in a catalog key ("i18n: <key>") to translate it per locale.
Translation Catalogs
Catalog is the translation reference system where definitions are not declared explicite at the property level. Thanks to that, managing bigger translations is much easier.
Sources
There are three ways to supply catalogs, in priority order:
Format
Both flat dot-keys and nested objects are accepted — and can coexist in the same file. Lookup tries the exact flat key first, then walks dot-segments through nested objects.
Per-Locale Overrides
If you need to override translations for a built-in structure like banner or footer add overrides:
i18nSettings
A top-level i18n is a global configuration for how internationalization behaves:
defaultLocalestringdetectLanguagebooleancatalogsRecord<string, string | TranslationCatalog>
Show your support! Star us on GitHub ⭐️