feat(docs): add bilingual package documentation site

This commit is contained in:
Maofeng
2026-09-20 15:53:28 +08:00
parent 60f6f1fb1a
commit dc80bd8ae0
111 changed files with 6531 additions and 0 deletions
@@ -0,0 +1,36 @@
---
title: UI 本地化
description: 只加载当前语言所需的 UI 词典和日历 locale。
order: 21
toc:
- id: catalog-source
title: 词典来源
- id: direct-imports
title: 直接导入
- id: supported-locales
title: 支持的语言
---
## 词典来源 {#catalog-source}
在应用国际化配置中加入 UI 词典来源:
```json
{
"catalogSources": ["@workspace/ui/locales/{locale}"]
}
```
locales 根入口只包含元数据和类型,不会导入所有语言的词典。
## 直接导入 {#direct-imports}
```ts
import { calendarLocale, messages } from "@workspace/ui/locales/zh-Hans"
```
每个语言入口还会导出对应的 `react-day-picker` locale。
## 支持的语言 {#supported-locales}
UI 词典支持简体中文(`zh-Hans`)和美式英语(`en-US`)。