Most of the internal documentation of alauda
is bilingual in Chinese and English. Therefore, we by default support using en
/zh
subfolders to store documents in different languages. It is recommended to also store static resources under en
/zh
subfolders in the public
directory, which facilitates the management of both documentation content and static resources.
i18n.json
For reusable components, if you need to support both Chinese and English within the same component, you first need to create an i18n.json
file under the docs
directory. Then, in the component, use useI18n
to get the text for the current language, for example:
.ts/.tsx
.mdx