From 1a6853ad3374fc55c8ee832eeecd37be9b1b6a19 Mon Sep 17 00:00:00 2001 From: Deep Singhvi Date: Sun, 26 Apr 2026 22:38:47 -0400 Subject: [PATCH 1/3] Add i18n docs example project Co-Authored-By: Oz --- README.md | 1 + i18n/fern/docs.yml | 16 +++++++++++ i18n/fern/fern.config.json | 4 +++ i18n/fern/pages/getting-started.mdx | 23 ++++++++++++++++ i18n/fern/pages/introduction.mdx | 11 ++++++++ .../translations/ja/pages/getting-started.mdx | 27 +++++++++++++++++++ .../translations/ja/pages/introduction.mdx | 15 +++++++++++ 7 files changed, 97 insertions(+) create mode 100644 i18n/fern/docs.yml create mode 100644 i18n/fern/fern.config.json create mode 100644 i18n/fern/pages/getting-started.mdx create mode 100644 i18n/fern/pages/introduction.mdx create mode 100644 i18n/fern/translations/ja/pages/getting-started.mdx create mode 100644 i18n/fern/translations/ja/pages/introduction.mdx diff --git a/README.md b/README.md index 8a20ea0..fe50428 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Example Fern docs projects. Each top-level folder is a self-contained example wi | Example | Description | Live demo | | --- | --- | --- | | [`docs-starter`](./docs-starter) | Minimal starter project | [docs-starter.docs.buildwithfern.com](https://docs-starter.docs.buildwithfern.com) | +| [`i18n`](./i18n) | Multi-language docs with English + Japanese translations | [i18n.docs.buildwithfern.com](https://i18n.docs.buildwithfern.com) | | [`versioning`](./docs-versioned) | Versioned site with a version dropdown and a shared page | [versioning.docs.buildwithfern.com](https://versioning.docs.buildwithfern.com) | ## Use an example diff --git a/i18n/fern/docs.yml b/i18n/fern/docs.yml new file mode 100644 index 0000000..1101d75 --- /dev/null +++ b/i18n/fern/docs.yml @@ -0,0 +1,16 @@ +# yaml-language-server: $schema=https://schema.buildwithfern.dev/docs-yml.json + +instances: + - url: i18n.docs.buildwithfern.com + +title: Fern Docs i18n Example + +translations: + - lang: en + - lang: ja + +navigation: + - page: Introduction + path: pages/introduction.mdx + - page: Getting Started + path: pages/getting-started.mdx diff --git a/i18n/fern/fern.config.json b/i18n/fern/fern.config.json new file mode 100644 index 0000000..5da31a8 --- /dev/null +++ b/i18n/fern/fern.config.json @@ -0,0 +1,4 @@ +{ + "organization": "fern-docs-examples", + "version": "*" +} diff --git a/i18n/fern/pages/getting-started.mdx b/i18n/fern/pages/getting-started.mdx new file mode 100644 index 0000000..ecd728a --- /dev/null +++ b/i18n/fern/pages/getting-started.mdx @@ -0,0 +1,23 @@ +# Getting Started + +Follow these steps to get up and running quickly. + +## Step 1: Install + +```bash +npm install @fern-api/fern-cli -g +``` + +## Step 2: Initialize + +```bash +fern init +``` + +## Step 3: Generate + +```bash +fern generate +``` + +You're all set! Check the output directory for your generated files. diff --git a/i18n/fern/pages/introduction.mdx b/i18n/fern/pages/introduction.mdx new file mode 100644 index 0000000..ee44b45 --- /dev/null +++ b/i18n/fern/pages/introduction.mdx @@ -0,0 +1,11 @@ +# Introduction + +Welcome to the i18n docs example. This project demonstrates multi-language support using Fern's translations feature. + +## What is this? + +This is a minimal documentation site that uses English as the default language and Japanese as a translated locale. + +## How it works + +The default pages live in the `pages/` directory. Translated versions live in `translations//pages/`, mirroring the same file paths. diff --git a/i18n/fern/translations/ja/pages/getting-started.mdx b/i18n/fern/translations/ja/pages/getting-started.mdx new file mode 100644 index 0000000..85bbc61 --- /dev/null +++ b/i18n/fern/translations/ja/pages/getting-started.mdx @@ -0,0 +1,27 @@ +--- +sidebar-title: はじめ方 +--- + +# はじめ方 + +以下の手順に従って、すぐに使い始めましょう。 + +## ステップ1: インストール + +```bash +npm install @fern-api/fern-cli -g +``` + +## ステップ2: 初期化 + +```bash +fern init +``` + +## ステップ3: 生成 + +```bash +fern generate +``` + +完了です!生成されたファイルは出力ディレクトリで確認できます。 diff --git a/i18n/fern/translations/ja/pages/introduction.mdx b/i18n/fern/translations/ja/pages/introduction.mdx new file mode 100644 index 0000000..b078ebe --- /dev/null +++ b/i18n/fern/translations/ja/pages/introduction.mdx @@ -0,0 +1,15 @@ +--- +sidebar-title: はじめに +--- + +# はじめに + +i18nドキュメントサンプルへようこそ。このプロジェクトは、Fernの翻訳機能を使用した多言語サポートのデモです。 + +## これは何ですか? + +これは、デフォルト言語を英語、翻訳ロケールを日本語として、国際化(i18n)を示す最小限のドキュメントサイトです。 + +## 仕組み + +デフォルトのページは `pages/` ディレクトリにあります。翻訳版は `translations//pages/` に同じファイルパスで配置されます。 From 43441d0e0eb73d7954b453c22e0e2dfeffd28600 Mon Sep 17 00:00:00 2001 From: Deep Singhvi Date: Sun, 26 Apr 2026 22:45:45 -0400 Subject: [PATCH 2/3] Upgrade Fern CLI to 4.97.0 and include i18n workflows Co-Authored-By: Oz --- .github/workflows/check.yml | 2 +- .github/workflows/preview-docs.yml | 2 +- .github/workflows/publish-docs.yml | 2 +- docs-starter/fern/fern.config.json | 2 +- i18n/fern/fern.config.json | 2 +- versioning/fern/fern.config.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8d5e078..b098b66 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - project: [docs-starter, versioning] + project: [docs-starter, i18n, versioning] steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml index 6418886..ca6fc1e 100644 --- a/.github/workflows/preview-docs.yml +++ b/.github/workflows/preview-docs.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - project: [docs-starter, versioning] + project: [docs-starter, i18n, versioning] steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 11f752e..75d1b59 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - project: [docs-starter, versioning] + project: [docs-starter, i18n, versioning] steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/docs-starter/fern/fern.config.json b/docs-starter/fern/fern.config.json index ec7b212..63d358c 100644 --- a/docs-starter/fern/fern.config.json +++ b/docs-starter/fern/fern.config.json @@ -1,4 +1,4 @@ { "organization": "fern-docs-examples", - "version": "4.35.0" + "version": "4.97.0" } diff --git a/i18n/fern/fern.config.json b/i18n/fern/fern.config.json index 5da31a8..63d358c 100644 --- a/i18n/fern/fern.config.json +++ b/i18n/fern/fern.config.json @@ -1,4 +1,4 @@ { "organization": "fern-docs-examples", - "version": "*" + "version": "4.97.0" } diff --git a/versioning/fern/fern.config.json b/versioning/fern/fern.config.json index ec7b212..63d358c 100644 --- a/versioning/fern/fern.config.json +++ b/versioning/fern/fern.config.json @@ -1,4 +1,4 @@ { "organization": "fern-docs-examples", - "version": "4.35.0" + "version": "4.97.0" } From 3a2630391415ae536105f2d29bea94f9c5584662 Mon Sep 17 00:00:00 2001 From: Deep Singhvi Date: Sun, 26 Apr 2026 22:50:46 -0400 Subject: [PATCH 3/3] Add French locale and logo assets to i18n example Co-Authored-By: Oz --- i18n/fern/docs.yml | 6 +++++ i18n/fern/images/logo-dark.svg | 9 +++++++ i18n/fern/images/logo-light.svg | 14 ++++++++++ i18n/fern/pages/introduction.mdx | 2 +- .../translations/fr/pages/getting-started.mdx | 27 +++++++++++++++++++ .../translations/fr/pages/introduction.mdx | 15 +++++++++++ .../translations/ja/pages/introduction.mdx | 2 +- 7 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 i18n/fern/images/logo-dark.svg create mode 100644 i18n/fern/images/logo-light.svg create mode 100644 i18n/fern/translations/fr/pages/getting-started.mdx create mode 100644 i18n/fern/translations/fr/pages/introduction.mdx diff --git a/i18n/fern/docs.yml b/i18n/fern/docs.yml index 1101d75..30db5c4 100644 --- a/i18n/fern/docs.yml +++ b/i18n/fern/docs.yml @@ -5,8 +5,14 @@ instances: title: Fern Docs i18n Example +logo: + light: images/logo-light.svg + dark: images/logo-dark.svg + height: 32 + translations: - lang: en + - lang: fr - lang: ja navigation: diff --git a/i18n/fern/images/logo-dark.svg b/i18n/fern/images/logo-dark.svg new file mode 100644 index 0000000..144e0e3 --- /dev/null +++ b/i18n/fern/images/logo-dark.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/i18n/fern/images/logo-light.svg b/i18n/fern/images/logo-light.svg new file mode 100644 index 0000000..7cf2ee2 --- /dev/null +++ b/i18n/fern/images/logo-light.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/i18n/fern/pages/introduction.mdx b/i18n/fern/pages/introduction.mdx index ee44b45..3ed4bf1 100644 --- a/i18n/fern/pages/introduction.mdx +++ b/i18n/fern/pages/introduction.mdx @@ -4,7 +4,7 @@ Welcome to the i18n docs example. This project demonstrates multi-language suppo ## What is this? -This is a minimal documentation site that uses English as the default language and Japanese as a translated locale. +This is a minimal documentation site that uses English as the default language with Japanese and French as translated locales. ## How it works diff --git a/i18n/fern/translations/fr/pages/getting-started.mdx b/i18n/fern/translations/fr/pages/getting-started.mdx new file mode 100644 index 0000000..9b4b425 --- /dev/null +++ b/i18n/fern/translations/fr/pages/getting-started.mdx @@ -0,0 +1,27 @@ +--- +sidebar-title: Démarrage +--- + +# Bien démarrer + +Suivez ces étapes pour commencer rapidement. + +## Étape 1 : Installer + +```bash +npm install @fern-api/fern-cli -g +``` + +## Étape 2 : Initialiser + +```bash +fern init +``` + +## Étape 3 : Générer + +```bash +fern generate +``` + +C'est prêt ! Vérifiez le dossier de sortie pour voir les fichiers générés. diff --git a/i18n/fern/translations/fr/pages/introduction.mdx b/i18n/fern/translations/fr/pages/introduction.mdx new file mode 100644 index 0000000..6ccc21c --- /dev/null +++ b/i18n/fern/translations/fr/pages/introduction.mdx @@ -0,0 +1,15 @@ +--- +sidebar-title: Introduction +--- + +# Introduction + +Bienvenue dans cet exemple de documentation i18n. Ce projet montre la prise en charge multilingue avec la fonctionnalité de traduction de Fern. + +## De quoi s'agit-il ? + +Il s'agit d'un site de documentation minimal avec l'anglais comme langue par défaut, et le japonais ainsi que le français comme langues traduites. + +## Comment cela fonctionne + +Les pages par défaut se trouvent dans le dossier `pages/`. Les versions traduites se trouvent dans `translations//pages/`, en reprenant les mêmes chemins de fichiers. diff --git a/i18n/fern/translations/ja/pages/introduction.mdx b/i18n/fern/translations/ja/pages/introduction.mdx index b078ebe..c9147e0 100644 --- a/i18n/fern/translations/ja/pages/introduction.mdx +++ b/i18n/fern/translations/ja/pages/introduction.mdx @@ -8,7 +8,7 @@ i18nドキュメントサンプルへようこそ。このプロジェクトは ## これは何ですか? -これは、デフォルト言語を英語、翻訳ロケールを日本語として、国際化(i18n)を示す最小限のドキュメントサイトです。 +これは、デフォルト言語を英語とし、日本語とフランス語の翻訳ロケールを持つ、国際化(i18n)を示す最小限のドキュメントサイトです。 ## 仕組み