import { useTranslation } from 'react-i18next' import { LANGUAGES, type LanguageCode } from '@/i18n' interface LanguageSelectorProps { /** Additional CSS classes */ className?: string /** Compact mode - shows only flag and code */ compact?: boolean } /** * A dropdown component for selecting the application language. * Uses i18next for language switching and persists choice to localStorage. */ export default function LanguageSelector({ className = '', compact = false }: LanguageSelectorProps) { const { i18n, t } = useTranslation('common') const handleLanguageChange = (e: React.ChangeEvent) => { const newLang = e.target.value as LanguageCode i18n.changeLanguage(newLang) } return (
{/* Custom dropdown arrow */}
) }