Dialog
Dialog - Default
A dialog component with support for multiple locales
Loading...
Usage
The Language Switcher component provides an elegant way to switch between different languages in your application. It uses next-intl
for internationalization and integrates seamlessly with Next.js routing.
Features
- Automatically detects and displays current language
- Smooth locale switching
- RTL support for Arabic language
- Dropdown menu interface
- Uses Languages icon from Lucide icons
- Customizable size and styling
Implementation
The component uses:
next-intl
for internationalization- Next.js router for locale switching
- Dropdown menu for language selection
- Radix UI for accessible dropdown components
Props
The LanguageSwitcher component accepts the following props:
Prop | Type | Default |
---|---|---|
defaultSize? | boolean | false |
className? | string | undefined |
style? | React.CSSProperties | undefined |