Internationalization / Localization / Translation support
For documentation websites that serve a global audience, providing translated content greatly enhances user experience and adoption. This issue requests first-class internationalization support (translations) within Fern Docs. When introducing localization, the desire is to create a copy of the same content but in a different language.
Key outcome: Increased accessibility and usability for non-English speaking users. Feature: Native support for multiple languages within a single Fern Docs instance. A user-friendly language switching UI for end-users. Bonus: Integration ecosystem to automate translations via third-party services. Timeline: Targeting Q4 2025, with the possibility of earlier release based on customer demand.
Page slugs should be the same, with the language prefix:
website.com/docs/overview/introduction and website.com/docs/zh/overview/introduction
Relevant docs from Vercel: https://nextjs.org/docs/pages/building-your-application/routing/internationalization
Proposal for mdx pages:
/path/to/content.mdx← default localization (defaults to:en-US)/path/to/content.fr.mdx← french/path/to/content.es.mdx← spanish/path/to/content.zh.mdx← chinese
Proposal for docs.yml:
default-locale: en # this is the default if not set
locales:
- en
- fr
- es
- zh
throw-if-locales-incomplete: true # fern generate --docs will throw an error if a translation doesn't exist
navigation:
- page:
en: Overview # <-- this is the default, so the slug will be `/overview`
fr: Aperçu
es: General
zh: 概述
path: ./path/to/content.mdx # <-- the `.fr.mdx` etc. should be picked up
Any alternatives?
Use the versions feature in a hacky way.
@dannysheridan I think this would work great for the guides and markdown files but how would you see translations working for the API reference based on the API specs?