mirror of
https://github.com/vercel/commerce.git
synced 2025-06-28 09:21:22 +00:00
12 lines
317 B
TypeScript
12 lines
317 B
TypeScript
import { getRequestConfig } from 'next-intl/server';
|
|
import { cookies } from 'next/headers';
|
|
|
|
export default getRequestConfig(async () => {
|
|
const locale = ((await cookies()).get('locale')?.value as string) || 'it';
|
|
|
|
return {
|
|
locale,
|
|
messages: (await import(`../messages/${locale}.json`)).default
|
|
};
|
|
});
|