Add FA, EN, and AR static copy, with English LTR and catalog hidden outside Persian.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-31 17:29:24 +03:30
co-authored by Cursor
parent 51fb9f6a26
commit 6543c994c3
27 changed files with 1395 additions and 368 deletions
+7 -3
View File
@@ -12,7 +12,10 @@
## Stack
- Next.js 15 (App Router) + React 19 + TypeScript
- Tailwind CSS v4 (utility import) + custom CSS in `src/app/globals.css`
- Language: `fa`, direction: `rtl`
- Language: `fa` (default, RTL), `en` (LTR), `ar` (RTL)
- Static copy lives in `src/i18n/fa.ts`, `src/i18n/en.ts`, `src/i18n/ar.ts`
- Locale cookie: `kaman-locale` (also mirrored in localStorage)
- Products and blog are **FA-only** for now (hidden in EN/AR nav, homepage, and redirected away)
- Fonts:
- `iran-yekan` from Meshkee CDN (Persian UI / body)
- `Rajdhani` via `next/font/google` (English UI, class `.en`)
@@ -37,12 +40,12 @@
| `/about` | درباره ما |
| `/contact` | تماس با ما |
Header (RTL): logo + menu on the right; search, language (FA/EN), and account on the left.
Header (RTL for FA/AR, LTR for EN): logo + menu on the inline-start; search, language (FA/EN/AR), and account on the inline-end.
- Signed out: icon links to `https://customer.kamancable.ir`
- Signed in: `{firstName} عزیز` dropdown — پروفایل من, خروج, and مدیریت وبسایت if the user is a website admin
- Session: shared cookies `meshkee_customer_access_token` / refresh, hydrated into localStorage; `/api/auth/me` proxies `GET /auth/me`
Homepage product cards are Meshkee `categories` slot teasers (duplicatable; empty API keeps `src/data/site.ts`). The full catalog is `/products`.
Homepage product cards and blog carousel are FA-only. EN and AR hide products/blog (nav, homepage, and `/products` `/blog` redirect home). The full catalog remains `/products` in FA.
Homepage blog carousel prefers Meshkee blogs, with `src/data/site.ts` as fallback.
## Meshkee API integration
@@ -120,6 +123,7 @@ Rules:
## Important paths
- Layout / shell: `src/app/layout.tsx`, `src/components/Header.tsx`, `src/components/AccountMenu.tsx`, `src/components/Footer.tsx`
- Home: `src/app/page.tsx`, `src/components/HeroSlider.tsx`, `src/components/ContactBar.tsx`
- i18n: `src/i18n/config.ts`, `src/i18n/fa.ts`, `src/i18n/en.ts`, `src/i18n/ar.ts`, `src/i18n/locale-context.tsx`
- Products: `src/app/products/page.tsx`, `src/app/products/[id]/[slug]/page.tsx`
- Blog: `src/app/blog/page.tsx`, `src/app/blog/[id]/[slug]/page.tsx`
- Config: `src/lib/config.ts`