mirror of
https://github.com/Dokploy/website.git
synced 2026-07-18 04:15:25 +02:00
16 lines
439 B
TypeScript
16 lines
439 B
TypeScript
import { getRequestConfig } from "next-intl/server";
|
|
import { routing } from "./routing";
|
|
|
|
export default getRequestConfig(async ({ requestLocale }) => {
|
|
let locale = await requestLocale;
|
|
// Validate that the incoming `locale` parameter is valid
|
|
if (!locale || !routing.locales.includes(locale as any)) {
|
|
locale = routing.defaultLocale;
|
|
}
|
|
|
|
return {
|
|
locale,
|
|
messages: (await import(`../locales/${locale}.json`)).default,
|
|
};
|
|
});
|