| 1 | # Internationalization (i18n) Migration Plan |
| 2 | |
| 3 | ## Current State |
| 4 | |
| 5 | - Docusaurus has complete Chinese (zh-CN) translations but they're **commented out** in config |
| 6 | - 79 translated markdown files exist in `/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/` |
| 7 | - Theme translations exist in `/docs/i18n/zh-CN/code.json` |
| 8 | |
| 9 | ## Mintlify Pro i18n Approach |
| 10 | |
| 11 | - Uses `versions` array in `mint.json` with `locale` values |
| 12 | - Supports Chinese as `cn` locale |
| 13 | - Auto-translates fixed UI text ("Was this page helpful?", etc.) |
| 14 | - Built-in internationalization feature in Mintlify Pro |
| 15 | - Requires manual content translation (which we already have) |
| 16 | |
| 17 | ## Migration Steps |
| 18 | |
| 19 | ### 1. Add Chinese Version to mint.json |
| 20 | |
| 21 | ```json |
| 22 | "versions": [ |
| 23 | { |
| 24 | "name": "English", |
| 25 | "locale": "en" |
| 26 | }, |
| 27 | { |
| 28 | "name": "中文", |
| 29 | "locale": "cn" |
| 30 | } |
| 31 | ] |
| 32 | ``` |
| 33 | |
| 34 | ### 2. Create Chinese Content Structure |
| 35 | |
| 36 | - Create `/docs2/cn/` directory |
| 37 | - Copy translated content from `/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/` |
| 38 | - Update paths and frontmatter for Mintlify format |
| 39 | |
| 40 | ### 3. Update Navigation for Chinese |
| 41 | |
| 42 | - Add version specification to navigation groups |
| 43 | - Ensure proper routing for Chinese pages |
| 44 | |
| 45 | ### 4. Content Format Migration |
| 46 | |
| 47 | - Convert Docusaurus-specific syntax to Mintlify format |
| 48 | - Update image paths from `/img/` to `/images/` |
| 49 | - Convert components (Info, Warning, Tabs, etc.) |
| 50 | |
| 51 | ## Implementation Decision |
| 52 | |
| 53 | For Phase 4, we have two options: |
| 54 | |
| 55 | 1. **Enable Chinese translations** - Full migration of existing Chinese content |
| 56 | 2. **Document for future** - Create migration plan but defer implementation |
| 57 | |
| 58 | Given that Chinese translations are currently disabled in production, **Option 2** is recommended for Phase 4 to avoid scope creep. The Chinese content is ready and can be migrated when needed. |
| 59 | |
| 60 | ## Files to Migrate (if enabled) |
| 61 | |
| 62 | - `/docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/` → `/docs2/cn/` |
| 63 | - 79 translated markdown files |
| 64 | - Navigation structure adaptation |
| 65 | - Theme translations (handled automatically by Mintlify) |
| 66 | |
| 67 | ## Next Steps |
| 68 | |
| 69 | 1. Document the migration approach |
| 70 | 2. Create helper scripts for content conversion |
| 71 | 3. Test with a small subset of Chinese pages |
| 72 | 4. Full migration when Chinese localization is prioritized |