LocalesMenuButton
The app-bar menu that switches the interface language, with each language named in its own.
Installation
pnpm dlx shadcn@latest add @chelone/locales-menu-buttonThe app-bar menu that switches the interface language, with each language named in its own.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | ReactNode | — | Shown in the trigger instead of the upper-cased current locale code. |
| languages | { locale: string; name: string }[] | — | Replaces the languages listed by `useLocales()`. Codes the i18n instance has no catalog for are left out, since choosing one would throw. |
| ref | Ref<HTMLButtonElement> | — |