mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-18 07:56:57 +00:00
12 lines
336 B
TypeScript
12 lines
336 B
TypeScript
|
|
import {getRequestConfig} from 'next-intl/server';
|
||
|
|
import {cookies} from 'next/headers';
|
||
|
|
|
||
|
|
export default getRequestConfig(async () => {
|
||
|
|
const cookieStore = await cookies();
|
||
|
|
const locale = cookieStore.get('language')?.value || 'en';
|
||
|
|
|
||
|
|
return {
|
||
|
|
locale,
|
||
|
|
messages: (await import(`./languages/${locale}.json`)).default
|
||
|
|
};
|
||
|
|
});
|