Support translations in Storybook: locale toolbar - #6843
Merged
Conversation
reecebrowne
requested review from
ConnorYoh,
EthanHealy01,
Frooodle and
jbrunton96
as code owners
June 29, 2026 19:30
reecebrowne
force-pushed
the
feat/shared-branding
branch
from
June 30, 2026 09:30
762d1d5 to
ee6ae00
Compare
reecebrowne
force-pushed
the
feat/storybook-locale-toggle
branch
from
June 30, 2026 09:31
bd6f52d to
2784e39
Compare
reecebrowne
changed the base branch from
feat/shared-branding
to
feat/storybook-i18n-init
June 30, 2026 09:32
Base automatically changed from
feat/storybook-i18n-init
to
feat/shared-branding
June 30, 2026 10:36
reecebrowne
force-pushed
the
feat/shared-branding
branch
from
June 30, 2026 10:40
4ca60d8 to
ee6ae00
Compare
reecebrowne
force-pushed
the
feat/storybook-locale-toggle
branch
from
June 30, 2026 10:47
2784e39 to
83c8e55
Compare
reecebrowne
changed the base branch from
feat/shared-branding
to
feat/storybook-i18n-init
June 30, 2026 10:47
Storybook only initialised i18n with en-US, so every story rendered English. Bundle all shipped locale TOMLs via a ?raw glob and add a globe toolbar that drives i18next.changeLanguage, so any story can be previewed in any supported language. RTL locales also flip document.dir/lang. The ?raw glob and import.meta.env now type-check thanks to a vite/client reference at the top of the preview.
reecebrowne
force-pushed
the
feat/storybook-locale-toggle
branch
from
July 15, 2026 16:38
83c8e55 to
d210386
Compare
jbrunton96
reviewed
Jul 17, 2026
jbrunton96
previously approved these changes
Jul 17, 2026
em dash Co-authored-by: James Brunton <jbrunton96@gmail.com>
jbrunton96
approved these changes
Jul 17, 2026
EthanHealy01
approved these changes
Jul 17, 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.
What
Adds a globe toolbar to Storybook so any story can be previewed in all 42 supported languages (the i18n init already on
mainwas English-only).How
Bundles every locale's
translation.tomlvia a?rawglob into i18next resources, and switches language on toolbar change. RTL locales (ar,fa) flipdocument.dir.