locale context from intl-context

This commit is contained in:
Max Peintner
2025-06-13 09:21:41 +02:00
parent 19236e19a8
commit 3cf8e00e79
2 changed files with 3 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ export default getRequestConfig(async () => {
const translations = await getHostedLoginTranslation({
serviceUrl,
locale,
organization: i18nOrganization,
});

View File

@@ -46,7 +46,6 @@ import {
VerifyPasskeyRegistrationRequest,
VerifyU2FRegistrationRequest,
} from "@zitadel/proto/zitadel/user/v2/user_service_pb";
import { getLocale } from "next-intl/server";
import { unstable_cacheLife as cacheLife } from "next/cache";
import { getUserAgent } from "./fingerprint";
import { createServiceForHost } from "./service";
@@ -63,11 +62,12 @@ async function cacheWrapper<T>(callback: Promise<T>) {
export async function getHostedLoginTranslation({
serviceUrl,
organization,
locale,
}: {
serviceUrl: string;
organization?: string;
locale?: string;
}) {
const locale = await getLocale();
const settingsService: Client<typeof SettingsService> =
await createServiceForHost(SettingsService, serviceUrl);