From e7ef30f5a600f4e412c7a25287cd1a56df1ff37f Mon Sep 17 00:00:00 2001 From: Matheo Guilbert Date: Fri, 17 Apr 2026 09:52:04 +0200 Subject: [PATCH] implemented language swicther --- app/[locale]/layout.tsx | 3 +- components/layout/Header.tsx | 11 +- components/ui/LanguageSwitcher.tsx | 42 ++ middleware.ts | 18 + package-lock.json | 734 ++++++++++++++++++++++++++++- package.json | 1 + proxy.ts | 12 - 7 files changed, 801 insertions(+), 20 deletions(-) create mode 100644 components/ui/LanguageSwitcher.tsx create mode 100644 middleware.ts delete mode 100644 proxy.ts diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index ab5411b..a6840dc 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -34,10 +34,9 @@ export default function RootLayout({
+ {/* Scrolling bloc */} - -
{children}
diff --git a/components/layout/Header.tsx b/components/layout/Header.tsx index 1087043..67faaa9 100644 --- a/components/layout/Header.tsx +++ b/components/layout/Header.tsx @@ -6,6 +6,8 @@ import { useParams, usePathname } from "next/navigation"; import { CiMenuFries } from "react-icons/ci"; import { IoCloseOutline } from "react-icons/io5"; +import LanguageSwitcher from "../ui/LanguageSwitcher"; + export default function Header() { const params = useParams<{ locale?: string }>(); const pathname = usePathname(); @@ -84,7 +86,9 @@ export default function Header() { ))} -
France
+
+ +