UPDATE: Update readme and Next 16.07 (CVE-2025-66478)
This commit is contained in:
11
i18n/request.ts
Normal file
11
i18n/request.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { getRequestConfig } from "next-intl/server";
|
||||
import { cookies } from "next/headers";
|
||||
|
||||
export default getRequestConfig( async () => {
|
||||
const locale = (await cookies()).get("MYNEXTAPP_LOCALE")?.value || "en";
|
||||
|
||||
return {
|
||||
locale,
|
||||
messages: (await import(`../messages/${locale}.json`)).default
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user