Internationalization
GemBook makes it easy to support multiple languages on the documentation site. The language code is displayed in the URL path: /{lang}/path.
When accessing the website, if the path contains a language code, the language version will be displayed. If not, the most appropriate language will be selected according to the browser settings and redirected.
Enable internationalization
- Use
to enable internationalization, which makes GemBook automatically redirect--i18n - Move the document to a folder named with the language code, for example:
For language code support, please check here.
Directory name localization
By default, the directory name will be rendered directly in the sidebar. If you need to localize the directory name, there are two ways:
- Modify the directory name, for example, change
docs/zh/guidetodocs/zh/002-指南 - Add the file
in the directory.config.yml
Last Updated:
01/12/2024, 06:55:54 AM