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-button

The app-bar menu that switches the interface language, with each language named in its own.

Props

PropTypeDefaultDescription
iconReactNode—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.
refRef<HTMLButtonElement>—