Localize your docs with variants in GitBook
Learn how to use variants in GitBook to translate and manage different versions of your docs site for multiple languages
Last updated
Learn how to use variants in GitBook to translate and manage different versions of your docs site for multiple languages
Last updated
This guide will walk you through the process of setting up variants, organizing your content, and ensuring your readers can access the right version of your documentation, in the language they want.
First, you need to create your content and localize it to the various languages you need — and there are a few ways to do it. You can translate part of your content using , or other AI services such as DeepL, ChatGPT or Claude.
Note: You will need to create a for each translated version of your docs in GitBook. You can then link all your translated spaces to a single docs site.
Once you have created all the spaces you need and localized your content, it’s time to set up your docs site in GitBook.
Your newly-created site will be empty, with no linked content. To add your documentation, click Link and existing space and choose the primary space you want to publish.
This will be the default space when people visit your docs, so make sure to select the space in your primary language.
You’ll see that the space you add will immediately appear in the structure table. Below it, click the Add variant button. You can scroll or search through all your spaces — select a space that contains a translated version of your docs to add it as a variant
Repeat this process for each of the languages you wish to publish. You can reorder your spaces at any time by clicking and dragging the drag handle on the left-hand side of a variant, and set a default by clicking the Actions menu on the right-hand side of the variant.
With all the steps done, you'll have a full site set up with multiple localized versions of your documentation. The structure will look something like this:
And your published site will have a dropdown for you to select each language individually: