docs: 更新新增语言包的说明

closed #8160
This commit is contained in:
陆伯言
2026-07-19 02:27:09 +08:00
parent 41c20a43af
commit 930597c605
2 changed files with 4 additions and 4 deletions

View File

@@ -103,8 +103,8 @@ const items = computed(() => [{ title: $t('demos.title') }]);
If you need to add a new language pack, follow these steps:
- Add the corresponding language pack file in the `packages/locales/langs` directory, for example, `zh-TW.json`, and translate the respective texts.
- In the corresponding application, locate the `src/locales/langs` file and add the new language pack `zh-TW.json`.
- Create the corresponding language pack folder and files under `packages/locales/langs` (e.g., `zh-TW/*.json`) and translate the texts accordingly.
- In the corresponding application, find the `src/locales/langs` directory and create the same language pack folder and files (e.g., `zh-TW/*.json`).
- Add the corresponding language in `packages/constants/src/core.ts`:
```ts

View File

@@ -103,8 +103,8 @@ const items = computed(() => [{ title: $t('demos.title') }]);
如果你需要新增语言包,需要按照以下步骤进行:
- 在 `packages/locales/langs` 目录下新增对应的语言包文件,例:`zh-TW.json`,并翻译对应的文本。
- 在对应的应用内,找到 `src/locales/langs` 文件,新增对应的语言包 `zh-TW.json`
- 在 `packages/locales/langs` 目录下新增对应的语言包文件夹和文件,例:`zh-TW/*.json`,并翻译对应的文本。
- 在对应的应用内,找到 `src/locales/langs` 目录,新增对应的语言包文件夹和文件 `zh-TW/*.json`
- 在 `packages/constants/src/core.ts`内,新增对应的语言:
```ts