Skip to content

Core / locale: buildLocaleSwitchItems

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

Page outline

Build headless locale-switch items (locale, active, label, testId) to render with any router. Re-exported by @palamedes/react / @palamedes/solid.

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

buildLocaleSwitchItems<TLocale extends string>(options: BuildLocaleSwitchItemsOptions<TLocale>): Array<LocaleSwitchItem<TLocale>>

Parameters

NameTypeRequired
optionsBuildLocaleSwitchItemsOptions<TLocale>Yes

Returns

Array<LocaleSwitchItem<TLocale>>

Source entry on GitHub

Last updated: November 1, 2026