translation bug fixed
This commit is contained in:
@@ -1,48 +1,18 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
|
||||
|
||||
import { ReactNode } from "react";
|
||||
import { NextIntlClientProvider } from "next-intl";
|
||||
import { getMessages } from "next-intl/server";
|
||||
import "./globals.css";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Firma - Industrial Equipment & Pumps",
|
||||
description:
|
||||
"Premium industrial pumps and equipment supplier with 10+ years of experience",
|
||||
};
|
||||
|
||||
async function RootLayout({
|
||||
children,
|
||||
params,
|
||||
}: Readonly<{
|
||||
children: ReactNode;
|
||||
params: Promise<Record<string, any>>;
|
||||
}>) {
|
||||
const resolvedParams = await params;
|
||||
const locale = resolvedParams.locale || "uz";
|
||||
const messages = await getMessages();
|
||||
import "../i18n/request"; // i18n config faylini import qilamiz
|
||||
import { LanguageProvider } from "@/context/language-context";
|
||||
import './globals.css'
|
||||
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang={locale}>
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
<NextIntlClientProvider messages={messages}>
|
||||
<html lang="uz">
|
||||
<body>
|
||||
<LanguageProvider>
|
||||
{children}
|
||||
</NextIntlClientProvider>
|
||||
</LanguageProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
export default RootLayout;
|
||||
|
||||
Reference in New Issue
Block a user