File structure
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.Example file structure
Configure the language switcher
To add a language switcher to your documentation, configure thelanguages array in your docs.json navigation.
docs.json
languages array requires:
language: ISO 639-1 language code- Full navigation structure
- Paths to translated files
Set default language
The first language in thelanguages array is automatically used as the default. To use a different language as the default, either reorder the array or add the default property:
docs.json
default property to override the order:
docs.json
Single language documentation
If you only want one language available without a language switcher, remove thelanguages field from your navigation configuration. Instead, define your navigation structure directly:
docs.json
Global navigation
To add global navigation elements that appear across all languages, configure theglobal object in your docs.json navigation.
docs.json
Localized footer and navbar
Customize the footer and navbar for each language to display translated content and region-specific links. Addfooter and navbar properties to each language configuration:
docs.json
footer and navbar override the global settings for that language. If a language doesn’t define these properties, it inherits the global configuration.
You can also configure a language-specific banner using the same pattern.
Maintain translations
Keep translations accurate and synchronized with your source content.Translation workflow
- Update source content in your primary language.
- Identify changed content.
- Translate changed content.
- Review translations for accuracy.
- Update translated files.
- Verify navigation and links work.
Automated translations
For automated translation solutions, set up an automation to run the agent on a schedule or in response to repository pushes.External translation providers
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.- Export source content: Extract MDX files that need translation.
- Send to translators: Provide files to your translation provider.
- Receive translations: Get translated MDX files back.
- Import and deploy: Add translated files to language directories and update navigation.
.github/workflows/export-for-translation.yml
.github/workflows/import-translations.yml
- Preserve frontmatter: Ensure translators keep YAML frontmatter intact, translating only
titleanddescriptionvalues. - Protect code blocks: Mark code blocks as “do not translate” for your vendors.
- Use translation memory: Provide glossaries with technical terms that should remain in English or have specific translations.
- Automate validation: Use CI checks to verify MDX syntax and frontmatter before merging translations.
- Version control: Track the source version for each translation to identify outdated content.
Images and media
Store translated images in language-specific directories.es/index.mdx
SEO for multi-language sites
Optimize each language version for search engines.Page metadata
Include translated metadata in each file’s frontmatter:fr/index.mdx
Best practices
Date and number formats
Consider locale-specific formatting for dates and numbers.- Date formats: MM/DD/YYYY (month/day/year) vs DD/MM/YYYY (day/month/year)
- Number formats: 1,000.00 vs 1.000,00
- Currency symbols: $100.00 vs 100,00€
Maintain consistency
- Maintain content parity across all languages to ensure every user gets the same quality of information.
- Create a translation glossary for technical terms.
- Keep the same content structure across languages.
- Match the tone and style of your source content.
- Use Git branches to manage translation work separately from main content updates.
Layout differences
Some languages require more or less space than English. Test your translated content on different screen sizes to ensure:- Navigation fits properly.
- Code blocks don’t overflow.
- Tables and other formatted text remain readable.
- Images scale appropriately.
Character encoding
Ensure your development environment and deployment pipeline support UTF-8 encoding to properly display all characters in languages with different alphabets and special characters.Frequently asked questions
Do I need to translate every page before launching a new language?
Do I need to translate every page before launching a new language?
No. You can launch a language with partial coverage and expand over time. A common approach is to translate your most-visited pages first—typically getting started content, authentication, and top how-to guides—and leave lower-traffic reference content in the default language until translations are ready. Users generally prefer some translated content over none.
What happens when a translated page is missing?
What happens when a translated page is missing?
If a user navigates to a translated URL that doesn’t exist, they’ll see a 404. To avoid this, either only include translated pages in your language-specific navigation or maintain parity between your default language and translated content. Using the same file structure across languages makes it easy to identify which translations are missing.
How do I handle code examples in translated content?
How do I handle code examples in translated content?
Do not translate code itself—variable names, function calls, and syntax are language-agnostic. Translate comments within code blocks if they explain concepts users need to understand. Fully translate instructions surrounding code blocks.
Does adding more languages affect site performance?
Does adding more languages affect site performance?
Mintlify serves each language version as a separate set of static pages, so a reader visiting
/es/quickstart only loads the Spanish content for that page—not every translation. Adding languages does not change page weight or runtime performance for end users.Adding languages does grow your repository and your build’s working set. To keep authoring and CI fast:- Store translated images in language-specific directories so unused locales aren’t pulled into other locales’ content.
- In larger repos, scope
mint broken-linksand other CI checks to changed files rather than the full tree.