Set up multi-language documentation to reach global audiences.
Internationalization (i18n) is the process of designing software or content to work for different languages and locales. This guide explains how to structure files, configure navigation, and maintain translations effectively so that you can help users access your documentation in their preferred language and improve global reach.
Organize translated content in language-specific directories to keep your documentation maintainable and structure your navigation by language.Create a separate directory for each language using ISO 639-1 language codes. Place translated files in these directories with the same structure as your default language.
The first language in the languages array is automatically used as the default. To use a different language as the default, either reorder the array or add the default property:
If you only want one language available without a language switcher, remove the languages field from your navigation configuration. Instead, define your navigation structure directly:
If you work with your own translation vendors or regional translators, you can integrate their workflow with your Mintlify documentation using GitHub Actions or similar CI/CD tools.
This workflow validates and imports translated content when added via PR:
.github/workflows/import-translations.yml
Report incorrect code
Copy
Ask AI
name: Import translationson: pull_request: paths: - 'es/**' - 'fr/**' - 'zh/**'jobs: validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Validate frontmatter run: | for file in $(git diff --name-only origin/main...HEAD -- '*.mdx'); do if ! head -1 "$file" | grep -q '^---$'; then echo "Error: $file missing frontmatter" exit 1 fi done - name: Check file structure run: | # Verify translated files match source structure for lang in es fr zh; do if [ -d "$lang" ]; then for file in $(find $lang -name '*.mdx'); do source_file="${file#*/}" if [ ! -f "$source_file" ]; then echo "Warning: $file has no English source at $source_file" fi done fi done
Ensure your development environment and deployment pipeline support UTF-8 encoding to properly display all characters in languages with different alphabets and special characters.