From c3f7fc5d2bf9b91f8cca60710f93df6d1812e3f9 Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Mon, 21 Oct 2024 11:13:18 +0330 Subject: [PATCH] blog homePage intenationalization added --- .../blog/components/footer/footer.tsx | 18 +++++++++---- .../blog/components/header/header.tsx | 10 +++++--- .../blog/components/header/navLinks.tsx | 12 +++++---- .../components/home/Categories/Categories.tsx | 13 ++++++---- .../home/filtered-posts/filteredPosts.tsx | 19 ++++++++------ .../(routes)/blog/components/home/new/new.tsx | 13 ++++++---- .../blog/components/home/random/random.tsx | 11 +++++--- src/app/(routes)/blog/page.tsx | 1 - src/app/lib/dictionaries/en.json | 23 +++++++++++++++++ src/app/lib/dictionaries/fa.json | 25 ++++++++++++++++++- src/app/types/types.ts | 23 +++++++++++++++++ 11 files changed, 131 insertions(+), 37 deletions(-) diff --git a/src/app/(routes)/blog/components/footer/footer.tsx b/src/app/(routes)/blog/components/footer/footer.tsx index 71600a5..df987c8 100644 --- a/src/app/(routes)/blog/components/footer/footer.tsx +++ b/src/app/(routes)/blog/components/footer/footer.tsx @@ -1,8 +1,11 @@ +import { getDictionary } from "@/app/lib/functions/dictionaries"; +import { getDefaultLocale } from "@/app/lib/functions/utils"; import Link from "next/dist/client/link"; import Image from "next/image"; import React from "react"; -export default function Footer() { +export default async function Footer() { + const dict = await getDictionary(getDefaultLocale()); return (
parsaaghayi's blog logo -

- All Rights Reserved 2024 +

+

+ {dict.website.footer.Year} +

+

+ {dict.website.footer.CopyRight} +

- parsa aghayi + {dict.website.footer.Name} -

+
); } diff --git a/src/app/(routes)/blog/components/header/header.tsx b/src/app/(routes)/blog/components/header/header.tsx index 8805e37..f5db71e 100644 --- a/src/app/(routes)/blog/components/header/header.tsx +++ b/src/app/(routes)/blog/components/header/header.tsx @@ -6,8 +6,12 @@ import Link from "next/link"; import BurgerButton from "../burger-button/burgerButton"; import { cookies } from "next/headers"; import SelectLanguage from "../selectLanguage/selectLanguage"; +import { getDictionary } from "@/app/lib/functions/dictionaries"; +import { getDefaultLocale } from "@/app/lib/functions/utils"; + +export default async function Header() { + const dict = await getDictionary(getDefaultLocale()); -export default function Header() { return (
@@ -22,7 +26,7 @@ export default function Header() {
- +