/** Validate/canonicalize the tag; available translation catalogs belong to the UI. */ export function interactionLanguage(value: unknown): string | undefined { if (typeof value !== "string") return undefined; try { const [canonical] = Intl.getCanonicalLocales(value); return canonical; } catch { return undefined; } }