Skip to content

Core / locale: createChoiceHandoffUrl

Functions, types, and exports for Core / locale: createChoiceHandoffUrl.

Page outline

Add a locale choice to a URL when it targets a different origin. The caller remains responsible for recording the choice and navigating. The source and target URLs must use HTTP or HTTPS.

import { createChoiceHandoffUrl } from "@palamedes/core/locale"

createChoiceHandoffUrl(options: {
    url: string;
    locale: string;
    currentOrigin: string;
    parameterName?: string;
}): string

Parameters

NameTypeRequired
options{ url: string; locale: string; currentOrigin: string; parameterName?: string }Yes

Returns

string

Source entry on GitHub

Last updated: November 1, 2026