feat(i18n): implement translation basis

This commit is contained in:
2026-04-14 22:23:33 +02:00
parent f0cbc758d9
commit 7ee9adcc9e
13 changed files with 525 additions and 20 deletions
+15
View File
@@ -0,0 +1,15 @@
import {getRequestConfig} from 'next-intl/server';
import {hasLocale} from 'next-intl';
import {routing} from './routing';
export default getRequestConfig(async ({requestLocale}) => {
const requested = await requestLocale;
const locale = hasLocale(routing.locales, requested)
? requested
: routing.defaultLocale;
return {
locale,
messages: (await import(`../messages/${locale}.json`)).default,
};
});