This commit is contained in:
Hamed
2026-08-01 15:15:34 +04:00
parent 87b518cf4e
commit 9697c98999
50 changed files with 2619 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
'use client';
import { Button, Tooltip } from 'antd';
import { useLanguage } from '@/app/context/LanguageContext';
export default function LanguageToggle() {
const { locale, toggleLocale } = useLanguage();
return (
<Tooltip title={locale === 'fa' ? 'Switch to English' : 'تغییر به فارسی'}>
<Button shape="circle" size="large" onClick={toggleLocale} aria-label="toggle language">
{locale === 'fa' ? 'EN' : 'فا'}
</Button>
</Tooltip>
);
}