diff --git a/src/ListBox/ListBoxSelection.svelte b/src/ListBox/ListBoxSelection.svelte index 93e755ec..317a300d 100644 --- a/src/ListBox/ListBoxSelection.svelte +++ b/src/ListBox/ListBoxSelection.svelte @@ -41,9 +41,12 @@ ctx.declareRef({ key: "selection", ref }); } - $: description = selectionCount - ? translateWithId("clearAll") - : translateWithId("clearSelection"); + $: translationId = selectionCount + ? translationIds.clearAll + : translationIds.clearSelection; + + $: description = + translateWithId?.(translationId) ?? defaultTranslations[translationId]; {#if selectionCount !== undefined}