diff --git a/components/core/I18nWidget/I18nWidget.tsx b/components/core/I18nWidget/I18nWidget.tsx index 6bbed6179..428f7bc1f 100644 --- a/components/core/I18nWidget/I18nWidget.tsx +++ b/components/core/I18nWidget/I18nWidget.tsx @@ -32,7 +32,12 @@ const LOCALES_MAP: Record = { } const I18nWidget: FC = () => { - const { locale, locales, defaultLocale = 'en-US' } = useRouter() + const { + locale, + locales, + defaultLocale = 'en-US', + asPath: currentPath, + } = useRouter() const options = locales?.filter((val) => val !== locale) const currentLocale = locale || defaultLocale @@ -59,7 +64,7 @@ const I18nWidget: FC = () => { {options.map((locale) => ( {({ active }) => ( - + {LOCALES_MAP[locale].name}