Add i18n foundation (fa-IR/en-US) and localize landing + auth.

Introduce path-prefixed locale routing under app/[lang] with a middleware
that detects locale from cookie/Accept-Language (default fa-IR) and
redirects. Add fa-IR (source of truth) and en-US dictionaries, a server
getDictionary, a client I18nProvider/useT, locale-aware Link + router
helpers, and a language switcher. The root [lang] layout sets html
lang/dir and the per-locale font (Peyda for fa, Inter for en).

Landing sections and the login/register/auth shell now read all copy from
the dictionaries; dashboard localization follows in a later commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
keyhan
2026-06-11 12:05:03 +03:30
parent 2b16846f67
commit 34993d417f
48 changed files with 785 additions and 200 deletions
@@ -1,23 +1,27 @@
import Link from 'next/link';
'use client';
import { Link } from '@/i18n/Link';
import { Logo } from '../Logo';
import { useT } from '@/i18n/I18nProvider';
export function Footer() {
const t = useT();
return (
<footer className="relative border-t border-white/15 bg-slate-950/35 px-6 py-12 backdrop-blur-md">
<div className="mx-auto flex max-w-6xl flex-col items-center justify-between gap-6 sm:flex-row">
<Logo className="abrban-ink" />
<nav className="abrban-ink flex items-center gap-6 text-sm text-white/80">
<Link href="/login" className="transition hover:text-white">
ورود
{t.common.login}
</Link>
<Link href="/register" className="transition hover:text-white">
ثبتنام
{t.common.register}
</Link>
<Link href="/dashboard" className="transition hover:text-white">
داشبورد
{t.common.dashboard}
</Link>
</nav>
<p className="abrban-ink text-sm text-white/70">© ابربان همهٔ حقوق محفوظ است</p>
<p className="abrban-ink text-sm text-white/70">{t.landing.footer.copyright}</p>
</div>
</footer>
);