Skip to content

Commit

Permalink
feat: Added German locale
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbozo authored and ghiscoding committed Aug 6, 2024
1 parent 6eb0bff commit 667ceca
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/demo/src/examples/example09.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ <h2 class="bd-title">
<option value="vi-VN">Vietnamese</option>
<option value="zh-CN">简体中文</option>
<option value="zh-TW">繁體中文</option>
<option value="de-DE">German</option>
</select>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
export type LocaleKey =
| 'cz-CS'
| 'da-DK'
| 'de-DE'
| 'en-US'
| 'es-ES'
| 'fr-FR'
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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<MultipleSelectInstance>);

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;

0 comments on commit 667ceca

Please sign in to comment.