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
Global navigation
To add global navigation elements that appear across all languages, configure theglobal object in your docs.json navigation.
docs.json
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, contact the Mintlify sales team.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
hreflang tags
Mintlify automatically generates hreflang tags for each language version of your documentation to help search engines understand the relationships between translated pages.Best practices
Date and number formats
Consider locale-specific formatting for dates and numbers.- Date formats: MM/DD/YYYY vs DD/MM/YYYY
- 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.