mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 08:27:32 +00:00
locale context from intl-context
This commit is contained in:
@@ -18,6 +18,7 @@ export default getRequestConfig(async () => {
|
|||||||
|
|
||||||
const translations = await getHostedLoginTranslation({
|
const translations = await getHostedLoginTranslation({
|
||||||
serviceUrl,
|
serviceUrl,
|
||||||
|
locale,
|
||||||
organization: i18nOrganization,
|
organization: i18nOrganization,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -46,7 +46,6 @@ import {
|
|||||||
VerifyPasskeyRegistrationRequest,
|
VerifyPasskeyRegistrationRequest,
|
||||||
VerifyU2FRegistrationRequest,
|
VerifyU2FRegistrationRequest,
|
||||||
} from "@zitadel/proto/zitadel/user/v2/user_service_pb";
|
} from "@zitadel/proto/zitadel/user/v2/user_service_pb";
|
||||||
import { getLocale } from "next-intl/server";
|
|
||||||
import { unstable_cacheLife as cacheLife } from "next/cache";
|
import { unstable_cacheLife as cacheLife } from "next/cache";
|
||||||
import { getUserAgent } from "./fingerprint";
|
import { getUserAgent } from "./fingerprint";
|
||||||
import { createServiceForHost } from "./service";
|
import { createServiceForHost } from "./service";
|
||||||
@@ -63,11 +62,12 @@ async function cacheWrapper<T>(callback: Promise<T>) {
|
|||||||
export async function getHostedLoginTranslation({
|
export async function getHostedLoginTranslation({
|
||||||
serviceUrl,
|
serviceUrl,
|
||||||
organization,
|
organization,
|
||||||
|
locale,
|
||||||
}: {
|
}: {
|
||||||
serviceUrl: string;
|
serviceUrl: string;
|
||||||
organization?: string;
|
organization?: string;
|
||||||
|
locale?: string;
|
||||||
}) {
|
}) {
|
||||||
const locale = await getLocale();
|
|
||||||
const settingsService: Client<typeof SettingsService> =
|
const settingsService: Client<typeof SettingsService> =
|
||||||
await createServiceForHost(SettingsService, serviceUrl);
|
await createServiceForHost(SettingsService, serviceUrl);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user