CoreControl/i18n/request.ts

12 lines
320 B
TypeScript
Raw Normal View History

2025-04-28 23:19:55 +02:00
import {getRequestConfig} from 'next-intl/server';
export default getRequestConfig(async () => {
// Provide a static locale, fetch a user setting,
// read from `cookies()`, `headers()`, etc.
const locale = 'en';
return {
locale,
messages: (await import(`./languages/${locale}.json`)).default
};
});