Lokalized JavaScript — Version 1.0.0
    Preparing search index...

    Function validateSsrStamp

    • Validate a server's stamp against the client instance before hydration. The client must have a complete, verified manifest load. All stamp fields, including locale selection and catalog identity, must match the client context.

      Parameters

      • stamp: LokalizedSsrStampV1

        the stamp the server serialized into the page

      • strings: Pick<
            Strings,
            | "getLoadVerification"
            | "getCatalogIdentity"
            | "isCatalogComplete"
            | "getLocaleConfiguration"
            | "getSupportedLocales"
            | "getDirectLocaleContext",
        >

        the client Strings about to hydrate

      • expectedContext:
            | Readonly<
                {
                    attemptedLocales: readonly string[];
                    cause: null;
                    failureReason: null;
                    isFallback: boolean;
                    key: string;
                    localeMatchResult: Readonly<
                        Readonly<
                            {
                                consideredLocales: readonly string[];
                                effectiveWeight: number
                                | null;
                                fallbackLocale: string;
                                isMatch: boolean;
                                languageRange: string | WeightedLanguageRange | null;
                                locale: string | null;
                                matchType:
                                    | "none"
                                    | "exact"
                                    | "canonical"
                                    | "cldr-fallback"
                                    | "likely-subtag"
                                    | "extended-range"
                                    | "primary-language"
                                    | "wildcard";
                                requestedLanguageRanges: readonly WeightedLanguageRange[];
                            },
                        >,
                    >;
                    lookupLocale: string;
                    resolvedLocale: string;
                    status: "translated";
                    translation: string;
                },
            >
            | Readonly<
                {
                    attemptedLocales: readonly string[];
                    cause: unknown;
                    failureReason: TranslationFailureReason;
                    isFallback: boolean;
                    key: string;
                    localeMatchResult: Readonly<
                        Readonly<
                            {
                                consideredLocales: readonly string[];
                                effectiveWeight: number
                                | null;
                                fallbackLocale: string;
                                isMatch: boolean;
                                languageRange: string | WeightedLanguageRange | null;
                                locale: string | null;
                                matchType:
                                    | "none"
                                    | "exact"
                                    | "canonical"
                                    | "cldr-fallback"
                                    | "likely-subtag"
                                    | "extended-range"
                                    | "primary-language"
                                    | "wildcard";
                                requestedLanguageRanges: readonly WeightedLanguageRange[];
                            },
                        >,
                    >;
                    lookupLocale: string;
                    resolvedLocale: null;
                    status: "returned-key"
                    | "returned-string";
                    translation: string;
                },
            >
            | SsrLocaleContext

        the context the client is rendering

      Returns void