'use client'; import {useLocale, useTranslations} from 'next-intl'; import {usePathname, useRouter} from 'next/navigation'; import {Globe} from 'lucide-react'; export default function LanguageSwitcher() { const locale = useLocale(); const t = useTranslations('language'); const router = useRouter(); const pathname = usePathname(); const switchLocale = () => { const newLocale = locale === 'en' ? 'ka' : 'en'; const newPath = pathname.replace(`/${locale}`, `/${newLocale}`); router.push(newPath); }; return (