Detect locale with is-china-user and show English copy for non-Chinese visitors.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import "./globals.css";
|
||||
|
||||
import { type Metadata, type Viewport } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import { LocaleProvider } from "~/components/locale-provider";
|
||||
|
||||
export const viewport: Viewport = {
|
||||
width: "device-width",
|
||||
@@ -52,7 +53,7 @@ export default function RootLayout({
|
||||
return (
|
||||
<html lang="zh-CN" className={`${geist.variable} ${geistMono.variable}`}>
|
||||
<body className="font-sans antialiased">
|
||||
{children}
|
||||
<LocaleProvider>{children}</LocaleProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user