Documentation

Multiple languages translation in Docusaurus

with Crowdin.

Donald Le
2 min readNov 16, 2020

--

Photo by Andrea Rodriguez on Unsplash

Docusaurus is a very convenient framework for building websites when it comes to documentation or blogging. Often in times, we need to have multiple translation support due to a wide range of audience.

Docusaurus now has version 2, but it is still alpha, so there is some functionality like translation is not well supported.

In this post, to demonstrate how to apply translation in Docusaurus, we will use version 1.

First we need to go over how Docusaurus apply translation. It comes with Crowdin support.

Crowdin Homepage

We need to create a new account and a project in crowdin. In order to work with Docusaurus, we need to get the Project_ID and API_Token from crowdin.

For project_id, navigate to https://crowdin.com/project/your_project_name/settings#api.

For api_token, navigate to https://crowdin.com/settings#api-key to generate the token.

For example we want to translate our documentation site to Vietnamese, the crowdin.yaml file would look like below

--

--

Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.