Skip to content

Update localization docs: BCP-47 codes and fallback behavior#5202

Merged
devalog merged 3 commits intomainfrom
devin/1777392203-update-localization-docs
Apr 28, 2026
Merged

Update localization docs: BCP-47 codes and fallback behavior#5202
devalog merged 3 commits intomainfrom
devin/1777392203-update-localization-docs

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented Apr 28, 2026

Summary

Updates the localization overview page with two changes:

  1. 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.yml config snippet, and translated file path examples.

  2. 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

  • Verify BCP-47 examples (fr-FR, ja-JP, en-US) match the codes supported by the Fern CLI
  • Confirm the fallback behavior description is accurate (assets resolve from default-language source when not present in a translation folder)

Notes

Requested by: Fern Support

- 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>
@fern-api fern-api Bot requested a review from devalog as a code owner April 28, 2026 16:05
@fern-api
Copy link
Copy Markdown
Contributor Author

fern-api Bot commented Apr 28, 2026

Requested by: devin
Slack thread: View conversation

<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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'don't' instead of 'do not'.

@github-actions
Copy link
Copy Markdown
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 devalog merged commit 85d5377 into main Apr 28, 2026
2 checks passed
@devalog devalog deleted the devin/1777392203-update-localization-docs branch April 28, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant