Components
Locale Switcher
A Paraglide-powered dropdown for switching between configured locales with localized language labels.
Install
Add this registry item to your app with shadcn.
bash
bunx --bun shadcn@latest add https://krakstack.net/r/locale-switcher.jsonOverview
locale-switcher provides a compact language switcher for Paraglide projects. It reads the current locale from Paraglide, lists the configured locales, and updates the active locale from a dropdown menu.
Features
- Uses Paraglide
getLocale,setLocale, andlocales - In-file English and French labels
- Optional message overrides
- Icon-only trigger with accessible screen-reader text
Usage
tsx
import { LocaleSwitcher } from "@/components/ui/locale-switcher";
<LocaleSwitcher />
<LocaleSwitcher messages={{ title: "Language", en: "EN", fr: "FR" }} />Dependencies
Packages and shadcn components required by this registry item.