diff --git a/components/core/I18nWidget/I18nWidget.tsx b/components/core/I18nWidget/I18nWidget.tsx index 132553f7f..31f2db76f 100644 --- a/components/core/I18nWidget/I18nWidget.tsx +++ b/components/core/I18nWidget/I18nWidget.tsx @@ -6,21 +6,47 @@ import { Menu } from '@headlessui/react' import { DoubleChevron } from '@components/icons' import s from './I18nWidget.module.css' -const LOCALES_MAP: Record = { - es: 'Español', - 'en-US': 'English', +interface LOCALE_DATA { + name: string + img: { + filename: string + alt: string + } +} + +const LOCALES_MAP: Record = { + es: { + name: 'Español', + img: { + filename: 'flag-es.svg', + alt: 'Bandera española', + }, + }, + 'en-US': { + name: 'English', + img: { + filename: 'flag-en-us.svg', + alt: 'US Flag', + }, + }, } const I18nWidget: FC = () => { const { locale, locales, defaultLocale = 'en-US' } = useRouter() const options = locales?.filter((val) => val !== locale) + const currentLocale = locale || defaultLocale + return (