mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-20 22:24:28 +01:00
14 lines
458 B
TypeScript
14 lines
458 B
TypeScript
import { getRequestConfig } from 'next-intl/server';
|
|
import { loadSettings } from '@/app/actions/data'; // Adjust path as necessary
|
|
|
|
export default getRequestConfig(async () => {
|
|
// Load settings to get the user's preferred language
|
|
const settings = await loadSettings();
|
|
const locale = settings.system.language || 'en'; // Fallback to 'en' if not set
|
|
|
|
return {
|
|
locale,
|
|
messages: (await import(`../messages/${locale}.json`)).default
|
|
};
|
|
});
|