Update localization docs: BCP-47 codes and fallback behavior#5202
Merged
Update localization docs: BCP-47 codes and fallback behavior#5202
Conversation
- Replace ISO 639-1 language codes with BCP-47 language tags (e.g., fr-FR, ja-JP) - Update all examples (folder names, docs.yml config, file paths) to use BCP-47 format - Add Fallback behavior section explaining that non-localized assets automatically resolve from the default language Co-Authored-By: bot_apk <apk@cognition.ai>
Contributor
Author
|
Requested by: devin |
| <Step title="Add a translations folder"> | ||
|
|
||
| Create a `translations` folder inside your `fern` directory, with a subfolder for each language using its [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g., `fr`, `ja`). Mirror your `pages/` structure inside each language folder. | ||
| Create a `translations` folder inside your `fern` directory, with a subfolder for each language using its [BCP-47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) (e.g., `fr-FR`, `ja-JP`). Mirror your `pages/` structure inside each language folder. |
Contributor
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Acronyms] 'BCP' has no definition.
|
|
||
| ## Fallback behavior | ||
|
|
||
| You only need to provide translated versions of the files you want to localize. For any file that does not have a translated version in a language folder — such as images, diagrams, or pages you have not yet translated — Fern automatically falls back to the default-language version. |
Contributor
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'doesn't' instead of 'does not'.
|
|
||
| ## Fallback behavior | ||
|
|
||
| You only need to provide translated versions of the files you want to localize. For any file that does not have a translated version in a language folder — such as images, diagrams, or pages you have not yet translated — Fern automatically falls back to the default-language version. |
Contributor
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'haven't' instead of 'have not'.
|
|
||
| You only need to provide translated versions of the files you want to localize. For any file that does not have a translated version in a language folder — such as images, diagrams, or pages you have not yet translated — Fern automatically falls back to the default-language version. | ||
|
|
||
| This means you do not need to copy non-localized assets (like `.png` or `.svg` files) into each language folder. Fern resolves them from the default-language source, keeping your translation folders lean and avoiding duplicate file maintenance. |
Contributor
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'don't' instead of 'do not'.
Contributor
|
🌿 Preview your docs: https://fern-preview-devin-1777392203-update-localization-docs.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
devalog
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the localization overview page with two changes:
BCP-47 language tags — Replaces all ISO 639-1 code references (
fr,ja,en) with BCP-47 language tags (fr-FR,ja-JP,en-US). This includes the explanatory text, folder name examples in the file tree,docs.ymlconfig snippet, and translated file path examples.Fallback behavior section — Adds a new section documenting that non-localized files (images, diagrams, untranslated pages) automatically fall back to the default-language version. Users do not need to copy assets into each language folder.
Review & Testing Checklist for Human
fr-FR,ja-JP,en-US) match the codes supported by the Fern CLINotes
Requested by: Fern Support