Overview
Understanding Multilingual Documentation
The multilingual documentation feature lets you provide documentation content in multiple languages and enables seamless language-switching across your site. Readers can easily switch between different locales using a built-in language selector menu, while site navigation, page trees, and user interface elements adapt automatically to the active language.
How Content is Organized
You can structure your documentation files using different parsing strategies so that content and metadata are correctly grouped by language. When a requested page does not have a translation available for a specific language, the site can automatically fall back to a designated default or fallback language.
Configuring Language Support
Setting Up Languages and Fallbacks
You define your available languages, default language, URL prefix behavior, file parsing strategy, and fallback language in your site configuration.
The available configuration options are detailed below:
| Option | Description |
|---|---|
languages | Supported locale codes. A separate page tree is built for each language. |
defaultLanguage | The default locale used when no language is specified. |
hideLocale | Controls how locale prefixes appear on URLs (supported modes: always, default-locale, never). |
parser | The strategy used to parse multi-language file structures (supported parsers: dot, dir, none). |
fallbackLanguage | The fallback language used when a page has no translations available for the current locale. Set to null to disable fallback. |
Note
When hideLocale is set to always, a cookie (FD_LOCALE by default) is used to store the user's preferred locale code.
Enabling Language Switching
Using the Language Selector
Readers can switch languages dynamically using the built-in language selector menu available in the site layout.
Tip
The language selector automatically reads available languages and names from your configuration, showing display names (such as English, 繁體中文, or 简体中文) in the popover menu.