frontend and backend base setup

This commit is contained in:
2024-11-13 16:43:32 +01:00
parent 338adc3b6f
commit 0db2a0c647
56 changed files with 9427 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import {getRequestConfig} from 'next-intl/server';
import {routing} from './routing';
export default getRequestConfig(async ({requestLocale}) => {
// This typically corresponds to the `[locale]` segment
let locale = await requestLocale;
type LocaleType = (typeof routing.locales)[number];
// Ensure that a valid locale is used
if (!locale || !routing.locales.includes(locale as LocaleType)) {
locale = routing.defaultLocale;
}
return {
locale,
messages: (await import(`../../messages/${locale}.json`)).default
};
});