0048908078
* Remove legacy `head.js` from examples and use `metadata` exports instead * Update the report template ---------
24 lines
510 B
TypeScript
24 lines
510 B
TypeScript
import { i18n } from '../../i18n-config'
|
|
|
|
export async function generateStaticParams() {
|
|
return i18n.locales.map((locale) => ({ lang: locale }))
|
|
}
|
|
|
|
export default function Root({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode
|
|
params: { lang: string }
|
|
}) {
|
|
return (
|
|
<html lang={params.lang}>
|
|
<body>{children}</body>
|
|
</html>
|
|
)
|
|
}
|
|
|
|
export const metadata = {
|
|
title: 'i18n within app directory - Vercel Examples',
|
|
description: 'How to do i18n in Next.js 13 within app directory',
|
|
}
|