docs: expand localization page with navigation overlay documentation#5287
docs: expand localization page with navigation overlay documentation#5287
Conversation
Document the translation overlay feature for sidebar and tabs:
- How to create fern/translations/{locale}/fern/docs.yml to translate
product switcher names, navbar links, and top-level fields
- How to create product-level overlays for section/page names
- Version file translation support
- Clear folder structure showing the overlay pattern
- Summary table of overlay file locations
- Complete example showing the full workflow
Co-Authored-By: bot_apk <apk@cognition.ai>
| ## Setup | ||
|
|
||
| <Accordion title="Early access setup"> | ||
| Make sure you're on the latest Fern CLI: |
There was a problem hiding this comment.
[FernStyles.Current] Avoid time-relative terms like 'latest' that become outdated
| - lang: zh | ||
| ``` | ||
|
|
||
| Use [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes (e.g., `en`, `ja`, `zh`, `fr`, `es`, `de`). |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Acronyms] 'ISO' has no definition.
|
🌿 Preview your docs: https://fern-preview-devin-1777591275-document-translations-feature.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
Co-Authored-By: bot_apk <apk@cognition.ai>
| - lang: zh | ||
| ``` | ||
|
|
||
| Use [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) two-letter language codes (e.g., `en`, `ja`, `zh`, `fr`, `es`, `de`). |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Acronyms] 'ISO' has no definition.
|
Requested by: devin |
Co-Authored-By: bot_apk <apk@cognition.ai>
| - lang: zh | ||
| ``` | ||
|
|
||
| Fern supports both two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) codes (e.g., `en`, `ja`, `zh`) and full [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale tags (e.g., `ja-JP`, `pt-BR`, `zh-Hans-CN`). The locale code you choose here determines your translation folder name under `fern/translations/`. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Acronyms] 'ISO' has no definition.
Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
|
|
||
| <Step title="Upgrade the Fern CLI"> | ||
|
|
||
| Localization requires the latest CLI version. |
There was a problem hiding this comment.
[FernStyles.Current] Avoid time-relative terms like 'latest' that become outdated
| - lang: zh | ||
| ``` | ||
|
|
||
| Fern supports both two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) codes (e.g., `en`, `ja`, `zh`) and full [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale tags (e.g., `ja-JP`, `pt-BR`, `zh-Hans-CN`). |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Acronyms] 'ISO' has no definition.
Summary
Expands the Localization documentation page to fully document the navigation translation overlay feature. Previously, the page only had a collapsed "Early access setup" accordion with a basic folder structure. Now it provides clear, step-by-step instructions for:
docs.ymlwith ISO 639-1 codesfern/translations/{locale}/fern/docs.ymlto translate product switcher names, navbar links, and top-level fieldsfern/translations/{locale}/fern/products/{product}/{product}.ymlto translate sidebar section names, page names, and tabsThis documents the feature described in PR #5203.
Review & Testing Checklist for Human
fern/translations/{locale}/fern/docs.yml,fern/translations/{locale}/fern/products/...) match what the latest Fern CLI actually expectsja-JP)<Files>,<Steps>, and code blocks render correctlyNotes
pre-releaseavailability tag and the alpha note since the feature is still in active development## Setupsection using<Steps>Requested by: Fern Support