---
title: "Multi-Language Sites"
description: "Multi-language support allows you to reach a global audience by providing your documentation or site content in multiple languages. You can define which languages are supported, set a default, and ..."
last_updated: "2026-07-02T09:48:33.561678+00:00"
canonical_url: "https://www.doc0.dev/docs/e8872a72-1909-479c-b585-dc74c6e26726/guide/how-to-guides/multi-language-sites"
---

Multi-language support allows you to reach a global audience by providing your documentation or site content in multiple languages. You can define which languages are supported, set a default, and configure how your URLs appear for different locales.

## Getting Started

To enable multi-language support, you configure the system by specifying the languages you wish to support and the language that should appear by default.

1. **Define Supported Languages:** Provide a list of all language codes (e.g., `['en', 'zh-CN']`) that your site will support.
2. **Set the Default:** Choose one language as the primary or default language for visitors who have not selected a specific preference.
3. **Configure URL Prefixes:** Choose how the system handles language identifiers in your website URLs. You can choose to:
    * **Always show:** Include the language code in every URL.
    * **Hide for default:** Only include the language code if the visitor is looking at a non-default language.
    * **Always hide:** Never show the language code in the URL.

> [!NOTE]
> When multi-language support is enabled, the system builds a separate navigation structure (page tree) for each language you have defined.

## Managing Translations

You can manage your translations by extending existing translation keys or by adding your own. The system uses specific keys to map interface elements (like buttons, labels, and error messages) to their translated text.

| Action | Description |
| :--- | :--- |
| `extend` | Register new translation keys that your content needs. |
| `add` | Provide the translated text for specific keys and languages. |
| `preset` | Quickly apply a pre-built language pack to your site. |

> [!TIP]
> If a specific page does not have a translation for the user's currently selected language, the system can automatically display a "fallback" language to ensure the user still sees content instead of an empty page.

## Key Concepts

* **Locale:** A code representing a language or a specific region (e.g., `en` for English, `zh-CN` for Simplified Chinese).
* **Fallback Language:** The secondary language that the system will display if a page has not been translated into the user's preferred language.
* **Translation Keys:** Internal identifiers used to track specific pieces of text, such as "Search" or "Next Page," ensuring they are consistently translated across the site.
* **URL Prefixing:** The method of adding a language code to the website address, which helps search engines and browsers understand which version of the site is being viewed.

> [!WARNING]
> Ensure that your chosen primary locale is one of the codes included in your supported list. If you use a code that isn't defined in your configuration, the system may not behave as expected for visitors accessing your site.

## Workflow Overview

The following diagram illustrates how the system handles language switching:

```mermaid
graph LR
    User[User Visits Site] --> Config{Check URL & Settings}
    Config --> |Default Locale| Default[Load Default Language]
    Config --> |Language Prefix| Specific[Load Selected Language]
    Default --> Page[Display Content]
    Specific --> Page
```

## Related

- [Writing Content](https://www.doc0.dev/docs/e8872a72-1909-479c-b585-dc74c6e26726/guide/core-features/writing-content)


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/e8872a72-1909-479c-b585-dc74c6e26726/llms.txt) for all pages in this wiki.
