Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalization l18n #6490

Open
dannysheridan opened this issue Mar 19, 2025 · 0 comments
Open

Internationalization l18n #6490

dannysheridan opened this issue Mar 19, 2025 · 0 comments
Labels
configuration Configuration within your fern folder product/docs Fern Docs which builds and hosts a developer documentation site

Comments

@dannysheridan
Copy link
Member

dannysheridan commented Mar 19, 2025

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 dannysheridan added product/docs Fern Docs which builds and hosts a developer documentation site configuration Configuration within your fern folder labels Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Configuration within your fern folder product/docs Fern Docs which builds and hosts a developer documentation site
Development

No branches or pull requests

1 participant