i18n on url of the documents #5006
-
I want to know if is there any way to translate the url of the documents |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In theory you can use the slug frontmatter on documents to customize the URL of localized docs But we don't have first class support for that. The way the "language switch" is implemented will redirect to the same doc URL with a different locale prefix, so if 2 language have different slugs for the same doc, that language switch will fail. We don't have a way to map It is not easy to build and apparently localizing slugs has little SEO value, so we made it out of the i18n scope: https://docusaurus.io/docs/i18n/introduction#i18n-non-goals |
Beta Was this translation helpful? Give feedback.
In theory you can use the slug frontmatter on documents to customize the URL of localized docs
But we don't have first class support for that. The way the "language switch" is implemented will redirect to the same doc URL with a different locale prefix, so if 2 language have different slugs for the same doc, that language switch will fail.
We don't have a way to map
/fr/doc-en-francais
to/en/doc-in-english
.It is not easy to build and apparently localizing slugs has little SEO value, so we made it out of the i18n scope: https://docusaurus.io/docs/i18n/introduction#i18n-non-goals