Multi-Language Documentation Guide
This guide explains how to work with the multi-language setup for your Mintlify documentation.Directory Structure
Configuration
docs.json
The docs.json file now includes a languages array within the navigation object, defining content for each language:
- English (en): Primary language with all existing content
- Chinese (cn): Simplified Chinese translations
- Korean (ko): Korean translations
- Navigation structure
- Translated group names
- Page paths relative to the language directory
How to Add Content
1. Adding New Pages
When adding a new page:- Create the file in the English (
en/) directory first - Add the page to the English navigation in
docs.json - Create corresponding files in Chinese (
cn/) and Korean (ko/) directories - Update the navigation for all languages in
docs.json
2. Translating Content
Manual Translation
- Copy the English content file to the target language directory
- Translate the content while maintaining:
- Markdown structure
- Frontmatter metadata
- Code blocks
- Component syntax
Automated Translation (Recommended)
Use Lingo.dev CLI for automated translations:-
Install Lingo.dev CLI (if not already installed):
-
Login to Lingo.dev:
-
Configure your project:
The
i18n.jsonfile is already configured for:- Source language: English (
en) - Target languages: Chinese (
cn) and Korean (ko)
- Source language: English (
-
Run the translation:
This will automatically translate all
.mdxfiles from English to Chinese and Korean. - Review and edit translations: After automated translation, review the generated files and make any necessary edits for accuracy.
Viewing Your Documentation
Local Development
Run the Mintlify dev server:http://localhost:3000 and use the language selector in the top navigation to switch between languages.
Production Deployment
Changes pushed to your default branch are automatically deployed. The language selector will be available in the production site.Tips
- Keep structure consistent: Ensure all language versions maintain the same directory structure
- Translate URLs carefully: When adding links within content, use language-appropriate URLs
- Test navigation: After adding new pages, verify they appear correctly in all languages
- Review automated translations: Always review machine-generated translations for accuracy, especially technical terms
Language Codes
en: English (default)cn: Chinese (Simplified)ko: Korean
Troubleshooting
- Pages not showing: Verify the page paths in
docs.jsoninclude the language prefix (e.g.,en/starter/overview) - Language selector not appearing: Ensure the
languagesarray indocs.jsonis properly configured - Translation errors: Check the file structure matches the expected patterns defined in
i18n.json