"use client"; import { useLocale } from "next-intl"; import { useRouter, usePathname } from "@/i18n/routing"; import { Button } from "poyraz-ui/atoms"; export function LanguageSwitcher() { const locale = useLocale(); const router = useRouter(); const pathname = usePathname(); const toggleLanguage = () => { const nextLocale = locale === "tr" ? "en" : "tr"; router.replace(pathname, { locale: nextLocale }); }; return ( ); }