LanguageSwitcher
v1.0.5Updated 27 Aug 2026Locale selector in menu or select form. Controlled, or drop-in via LocaleController which owns the locale state and renders LocaleProvider. Switching reformats every build69 date/number/currency via Intl.
Preview
Live · 6 stories▸Why this is recommendedlanguagelocalei18nswitcher+3
The default, out-of-the-box LanguageSwitcher.
- ✓App bars / site headers
- ✓Settings > language
- ✓Multi-locale apps
- menu (Globe) or select variant
- Controlled or LocaleController-driven
- Optional flag glyphs
- Drives LocaleProvider (Intl date/number/currency, Buddhist calendar)
- i18n: labels prop overrides the trigger aria-label; option text is each locale label; merged over DEFAULT_LANGUAGE_SWITCHER_LABELS
- ✕Single-locale apps
- ✕Region/currency-only selection
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
localesSelectable languages (falls back to a surrounding LocaleController)
—valueControlled active locale code
—onValueChangeCalled with (code, option)
—variantInteraction form (default "menu")
—showFlagsShow each option flag glyph (default true)
—labelsOverride built-in UI strings (i18n): trigger aria-label. Merged over DEFAULT_LANGUAGE_SWITCHER_LABELS
—