diff --git a/guides/internationalization.mdx b/guides/internationalization.mdx index 69853aef0..87614b094 100644 --- a/guides/internationalization.mdx +++ b/guides/internationalization.mdx @@ -37,7 +37,7 @@ Create a separate directory for each language using [ISO 639-1 language codes](h - `ru` - Russian - `sv` - Swedish - `tr` - Turkish -- `ua` - Ukrainian +- `uk` - Ukrainian - `uz` - Uzbek - `vi` - Vietnamese @@ -195,6 +195,91 @@ To add global navigation elements that appear across all languages, configure th } ``` +### Localized footer and navbar + +Customize the footer and navbar for each language to display translated content and region-specific links. + +Add `footer` and `navbar` properties to each language configuration: + +```json docs.json +{ + "navigation": { + "languages": [ + { + "language": "en", + "footer": { + "socials": { + "x": "https://x.com/mintlify" + }, + "links": [ + { + "header": "Resources", + "items": [ + { "label": "Documentation", "href": "/en/docs" }, + { "label": "Blog", "href": "https://mintlify.com/blog" } + ] + } + ] + }, + "navbar": { + "links": [ + { "label": "Docs", "href": "/en/docs" } + ], + "primary": { + "type": "button", + "label": "Get Started", + "href": "/en/quickstart" + } + }, + "groups": [ + { + "group": "Getting started", + "pages": ["en/quickstart", "en/index"] + } + ] + }, + { + "language": "es", + "footer": { + "socials": { + "x": "https://x.com/mintlify" + }, + "links": [ + { + "header": "Recursos", + "items": [ + { "label": "Documentaci贸n", "href": "/es/docs" }, + { "label": "Blog", "href": "https://mintlify.com/blog" } + ] + } + ] + }, + "navbar": { + "links": [ + { "label": "Documentaci贸n", "href": "/es/docs" } + ], + "primary": { + "type": "button", + "label": "Comenzar", + "href": "/es/quickstart" + } + }, + "groups": [ + { + "group": "Comenzando", + "pages": ["es/quickstart", "es/index"] + } + ] + } + ] + } +} +``` + +Language-specific `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. diff --git a/organize/navigation.mdx b/organize/navigation.mdx index 6ec3dbbb4..168b67763 100644 --- a/organize/navigation.mdx +++ b/organize/navigation.mdx @@ -574,7 +574,7 @@ Partition your navigation into different languages. Languages are selectable fro alt="Decorative graphic of a language switcher." /> -In the `navigation` object, `languages` is an array where each entry is an object that requires a `language` field and can contain any other navigation fields, including language-specific banner configurations. +In the `navigation` object, `languages` is an array where each entry is an object that requires a `language` field and can contain any other navigation fields, including language-specific banner, footer, and navbar configurations. We currently support the following languages for localization: @@ -618,6 +618,30 @@ We currently support the following languages for localization: "content": "馃殌 Version 2.0 is now live! See our [changelog](/en/changelog) for details.", "dismissible": true }, + "footer": { + "socials": { + "x": "https://x.com/mintlify" + }, + "links": [ + { + "header": "Resources", + "items": [ + { "label": "Documentation", "href": "/en/docs" }, + { "label": "Blog", "href": "https://mintlify.com/blog" } + ] + } + ] + }, + "navbar": { + "links": [ + { "label": "Docs", "href": "/en/docs" } + ], + "primary": { + "type": "button", + "label": "Get Started", + "href": "/en/quickstart" + } + }, "groups": [ { "group": "Getting started", @@ -631,6 +655,30 @@ We currently support the following languages for localization: "content": "馃殌 隆La versi贸n 2.0 ya est谩 disponible! Consulta nuestro [registro de cambios](/es/changelog).", "dismissible": true }, + "footer": { + "socials": { + "x": "https://x.com/mintlify" + }, + "links": [ + { + "header": "Recursos", + "items": [ + { "label": "Documentaci贸n", "href": "/es/docs" }, + { "label": "Blog", "href": "https://mintlify.com/blog" } + ] + } + ] + }, + "navbar": { + "links": [ + { "label": "Documentaci贸n", "href": "/es/docs" } + ], + "primary": { + "type": "button", + "label": "Comenzar", + "href": "/es/quickstart" + } + }, "groups": [ { "group": "Getting started", diff --git a/organize/settings.mdx b/organize/settings.mdx index 6d1053f28..3445eec64 100644 --- a/organize/settings.mdx +++ b/organize/settings.mdx @@ -532,7 +532,28 @@ This section contains the full reference for the `docs.json` file. - Language switcher for [multi-language](/organize/navigation#languages) sites. + Language switcher for [multi-language](/organize/navigation#languages) sites. Each language entry can include language-specific `banner`, `footer`, and `navbar` configurations in addition to the navigation structure. + + + + Language code in ISO 639-1 format. + + + Whether this is the default language. + + + Language-specific banner configuration. See [banner](#param-banner-1) for available options. + + + Language-specific footer configuration. See [footer](#param-footer-1) for available options. + + + Language-specific navbar configuration. See [navbar](#param-navbar-1) for available options. + + + Whether to hide this language option by default. + + Version switcher for sites with multiple [versions](/organize/navigation#versions).