We use docusaurus to build our document. See Docusaurus I18n Guide
Open site config: /website/docusaurus.config.js
. Add new language in i18n.locales
.
In /website
npm run write-translations -- --locale <language>
This will create the preset files by docusaurus in /website/i18n/<language>
.
In /website
npm run start -- --locale <language>
Note
- Each locale is a distinct standalone single-page application: it is not possible to start the Docusaurus sites in all locales at the same time.
- The static files may not be shown. Don't worry about that. It works fine in production.
Modify /website/i18n/<language>/code.json
where id start with home.
Modify files in /website/i18n/<language>/docusaurus-theme-classic
Note The examples and contributing docs are automatically generated by script so they don't need to be translated.
- Modify
/website/i18n/<language>/docusaurus-plugin-content-docs/current.json
for directory title. - Copy your docs Markdown files from
docs/
to/website/i18n/<language>/docusaurus-plugin-content-docs/current
, and translate them.
No translation needed for now :P