feat(frontend): use flag icons in the language switcher
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,10 +6,11 @@ export function LanguageSwitcher() {
|
||||
const { t } = useTranslation();
|
||||
const otherLang = lang === 'fr' ? 'en' : 'fr';
|
||||
const label = otherLang === 'en' ? t('nav.switchToEnglish') : t('nav.switchToFrench');
|
||||
const flagCode = otherLang === 'en' ? 'gb' : 'fr';
|
||||
|
||||
return (
|
||||
<Link to={`/${otherLang}/`} className="language-switcher">
|
||||
{label}
|
||||
<Link to={`/${otherLang}/`} className="language-switcher" aria-label={label} title={label}>
|
||||
<span className={`fi fi-${flagCode}`} aria-hidden="true" />
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user