Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added German locale #290

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading