Language
Language switcher for internationalized docs
The language switch component provides a dropdown for switching between locales in internationalized documentation.
Usage
Props
| prop | type | description |
|---|---|---|
| current | string | Current locale code |
| locales | Locale[] | Available locales |
| onChange | (code: string) => void | Callback when locale changes |
Types
With routing
Integrate with your i18n routing:
Keyboard navigation
The language switch supports full keyboard navigation:
EnterorSpaceto openArrowUp/ArrowDownto navigateEnterto selectEscapeto close