import { useRouter } from "next/router" import { useTranslations } from "next-intl" const LOCALES = [ { code: "en", label: "EN" }, { code: "fr", label: "FR" }, { code: "es", label: "ES" }, ] export default function LanguageSwitcher() { const router = useRouter() const t = useTranslations("Navigation") const switchLocale = (locale) => { router.push(router.asPath, router.asPath, { locale }) } return (
  • {t("language")}
  • ) }