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