mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Language selection
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import {getRequestConfig} from 'next-intl/server';
|
||||
|
||||
import {cookies} from 'next/headers';
|
||||
|
||||
export default getRequestConfig(async () => {
|
||||
// Provide a static locale, fetch a user setting,
|
||||
// read from `cookies()`, `headers()`, etc.
|
||||
const locale = 'en';
|
||||
const cookieStore = await cookies();
|
||||
const locale = cookieStore.get('language')?.value || 'en';
|
||||
|
||||
return {
|
||||
locale,
|
||||
|
||||
Reference in New Issue
Block a user