Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions guides/internationalization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,62 @@
}
```

### External URLs for language switcher

For multi-domain documentation setups where different locales are hosted on separate domains, you can configure external URLs in the language switcher. This is useful when not all pages exist in all locales or when you maintain separate documentation sites per region.

Check warning on line 134 in guides/internationalization.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/internationalization.mdx#L134

In general, use active voice instead of passive voice ('are hosted').

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor clarity: there are now two different languages arrays (navigation.languages vs navigation.global.languages); calling that out here helps avoid confusion.

Suggested change
For multi-domain documentation setups where different locales are hosted on separate domains, you can configure external URLs in the language switcher. This is separate from `navigation.languages`, which controls each locale’s navigation structure.

Configure default external URLs in your `docs.json`:

```json docs.json
{
"navigation": {
"global": {
"languages": [
{
"language": "en",
"default": true,
"href": "https://developers.example.com/docs"
},
{
"language": "de",
"href": "https://developers.example.de/docs"
},
{
"language": "fr",
"href": "https://developers.example.fr/docs"
},
{
"language": "es",
"href": "https://developers.example.es/docs"
}
]
}
}
}
```

#### Per-page locale links

Override the default language switcher URLs for specific pages using frontmatter. This allows you to link directly to the translated version of the current page instead of the homepage.

Add locale-specific links to your page frontmatter using the pattern `{language_code}_link`:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a quick sentence on the fallback behavior when a {language_code}_link isn’t set for a locale (does it fall back to the locale href from docs.json, or something else?).

```mdx api-reference/introduction.mdx
---
title: "API Introduction"
description: "Get started with our API"
de_link: "https://developers.example.de/docs/api-reference/introduction"
fr_link: "https://developers.example.fr/docs/api-reference/introduction"
es_link: "https://developers.example.es/docs/api-reference/introduction"
---
```

When a user switches languages on this page, they will be directed to the specific translated page URL instead of the default `href` configured in `docs.json`. This is particularly useful for:

Check warning on line 182 in guides/internationalization.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/internationalization.mdx#L182

Avoid using 'will'.

Check warning on line 182 in guides/internationalization.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/internationalization.mdx#L182

In general, use active voice instead of passive voice ('be directed').

- Multi-domain documentation where each locale has its own domain
- Documentation sites where not all pages are translated

Check warning on line 185 in guides/internationalization.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/internationalization.mdx#L185

In general, use active voice instead of passive voice ('are translated').
- Linking to equivalent pages across different documentation systems

## Maintain translations

Keep translations accurate and synchronized with your source content.
Expand Down Expand Up @@ -181,9 +237,9 @@
---
```

### hreflang tags

Check warning on line 240 in guides/internationalization.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/internationalization.mdx#L240

Did you really mean 'hreflang'?

Mintlify automatically generates hreflang tags for each language version of your documentation to help search engines understand the relationships between translated pages.

Check warning on line 242 in guides/internationalization.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/internationalization.mdx#L242

Did you really mean 'hreflang'?

## Best practices

Expand All @@ -191,7 +247,7 @@

Consider locale-specific formatting for dates and numbers.

- Date formats: MM/DD/YYYY vs DD/MM/YYYY

Check warning on line 250 in guides/internationalization.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/internationalization.mdx#L250

Spell out 'YYYY', if it's unfamiliar to the audience.

Check warning on line 250 in guides/internationalization.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

guides/internationalization.mdx#L250

Spell out 'YYYY', if it's unfamiliar to the audience.
- Number formats: 1,000.00 vs 1.000,00
- Currency symbols: $100.00 vs 100,00€

Expand Down