judge4c-old/src/i18n/request.ts

12 lines
295 B
TypeScript
Raw Normal View History

import { getUserLocale } from "@/services/locale";
import { getRequestConfig } from "next-intl/server";
export default getRequestConfig(async () => {
const locale = await getUserLocale();
return {
locale,
messages: (await import(`../../messages/${locale}.json`)).default,
};
});