This commit is contained in:
2025-04-03 20:21:05 +02:00
parent 8333cbf7be
commit f595acff64
24 changed files with 2976 additions and 84 deletions

13
src/i18n/request.ts Normal file
View File

@@ -0,0 +1,13 @@
import { getRequestConfig } from 'next-intl/server'
import { headers } from 'next/headers'
export default getRequestConfig(async () => {
// Provide a static locale, fetch a user setting,
// read from `cookies()`, `headers()`, etc.
const locale = (await headers()).get('accept-language')?.split(',')[0] ?? 'en'
return {
locale,
messages: (await import('../../messages/en.json')).default,
}
})