diff --git a/packages/demo/src/examples/example09.html b/packages/demo/src/examples/example09.html index 00bce434..8df59970 100644 --- a/packages/demo/src/examples/example09.html +++ b/packages/demo/src/examples/example09.html @@ -34,6 +34,7 @@

+ diff --git a/packages/multiple-select-vanilla/src/interfaces/locale.interface.ts b/packages/multiple-select-vanilla/src/interfaces/locale.interface.ts index f236e239..cd58b3ce 100644 --- a/packages/multiple-select-vanilla/src/interfaces/locale.interface.ts +++ b/packages/multiple-select-vanilla/src/interfaces/locale.interface.ts @@ -2,6 +2,7 @@ export type LocaleKey = | 'cz-CS' | 'da-DK' + | 'de-DE' | 'en-US' | 'es-ES' | 'fr-FR' diff --git a/packages/multiple-select-vanilla/src/locales/all-locales-index.ts b/packages/multiple-select-vanilla/src/locales/all-locales-index.ts index 8dadccff..775edd05 100644 --- a/packages/multiple-select-vanilla/src/locales/all-locales-index.ts +++ b/packages/multiple-select-vanilla/src/locales/all-locales-index.ts @@ -1,5 +1,6 @@ export * from './multiple-select-cz-CS'; export * from './multiple-select-da-DK'; +export * from './multiple-select-de-DE'; export * from './multiple-select-en-US'; export * from './multiple-select-es-ES'; export * from './multiple-select-fr-FR'; diff --git a/packages/multiple-select-vanilla/src/locales/multiple-select-de-DE.ts b/packages/multiple-select-vanilla/src/locales/multiple-select-de-DE.ts new file mode 100644 index 00000000..f1936485 --- /dev/null +++ b/packages/multiple-select-vanilla/src/locales/multiple-select-de-DE.ts @@ -0,0 +1,34 @@ +/** + * Multiple Select de-DE translation + * Author: Bugi Goertz + */ + +import type { MultipleSelectInstance } from '../MultipleSelectInstance'; +import type { MultipleSelectLocale, MultipleSelectLocales } from '../interfaces'; + +const ms = + typeof window !== 'undefined' && window.multipleSelect !== undefined + ? window.multipleSelect + : ({ locales: {} as MultipleSelectLocales } as Partial); + +export const German = { + formatSelectAll() { + return '[Alles auswählen]'; + }, + formatAllSelected() { + return 'Alles ausgewählt'; + }, + formatCountSelected(count: number, total: number) { + return `${count} von ${total} ausgewählt`; + }, + formatNoMatchesFound() { + return 'Keine Ergebnisse'; + }, + formatOkButton() { + return 'Schließen'; + }, +} as MultipleSelectLocale; + +(ms.locales as MultipleSelectLocales)['de-DE'] = German; + +export default ms.locales;