request.ts aktualisieren

This commit is contained in:
Marvin 2025-04-23 15:49:04 +02:00 committed by GitHub
parent e4888120d5
commit b3159de732
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,12 +1,11 @@
import {getRequestConfig} from 'next-intl/server';
import {getUserLocale} from '../services/locale';
export default getRequestConfig(async () => {
// Provide a static locale, fetch a user setting,
// read from `cookies()`, `headers()`, etc.
const locale = 'de-DE';
const locale = await getUserLocale();
return {
locale,
messages: (await import(`../../messages/${locale}.json`)).default
};
});
});