make translate for login, register pages

This commit is contained in:
smanylov
2025-12-10 16:39:13 +07:00
parent d9c26b079d
commit f281c13f87
31 changed files with 830 additions and 103 deletions
+41
View File
@@ -0,0 +1,41 @@
import Providers from '@/app/providers/getQueryServer'
import type { Metadata } from "next";
import { NextIntlClientProvider, hasLocale } from 'next-intl';
import { notFound } from 'next/navigation';
import { routing } from '@/i18n/routing';
import "../styles/globals.css";
import "../styles/global-styles.scss";
export function generateStaticParams() {
return routing.locales.map((locale: any) => ({ locale }));
}
export const metadata: Metadata = {
title: "No copy",
description: "No copy",
};
export default async function RootLayout({
children,
params
}: Readonly<{
children: React.ReactNode;
params: Promise<{ locale: string }>;
}>) {
const { locale } = await params;
if (!hasLocale(routing.locales, locale)) {
notFound();
}
return (
<html lang={locale}>
<body>
<NextIntlClientProvider>
<Providers>
{children}
</Providers>
</NextIntlClientProvider>
</body>
</html>
);
}