diff --git a/frontend/src/app/ntt-gantt/ntt-gantt.component.html b/frontend/src/app/ntt-gantt/ntt-gantt.component.html index 0947b14..286a4f2 100644 --- a/frontend/src/app/ntt-gantt/ntt-gantt.component.html +++ b/frontend/src/app/ntt-gantt/ntt-gantt.component.html @@ -169,7 +169,7 @@ (taskbarEditing)="taskbarEditing($event)" (taskbarEdited)="taskbarEdited($event)" (toolbarClick)="toolbarBtnClicked($event)" (rowSelected)="rowSelected($event)" (rowDeselected)="rowDeselected($event)" (created)="created($event)" (dataBound)="dataBound($event)" (load)="load($event)" - (queryTaskbarInfo)="queryTaskbarInfo($event)" (expanding)="onExpand($event)"> + (queryTaskbarInfo)="queryTaskbarInfo($event)" (expanding)="onExpand($event)" locale="de-DE"> diff --git a/frontend/src/app/ntt-gantt/ntt-gantt.component.ts b/frontend/src/app/ntt-gantt/ntt-gantt.component.ts index ee858a7..aa45256 100644 --- a/frontend/src/app/ntt-gantt/ntt-gantt.component.ts +++ b/frontend/src/app/ntt-gantt/ntt-gantt.component.ts @@ -25,8 +25,23 @@ import { GanttModule, ResizeService } from '@syncfusion/ej2-angular-gantt'; import { DateAdapter } from '@angular/material/core'; import { MAT_DATE_LOCALE } from '@angular/material/core'; import * as WebFont from 'webfontloader'; // Verwende import * as +import { L10n,loadCldr, setCulture } from '@syncfusion/ej2-base'; +setCulture('de-DE'); + +L10n.load({ + 'de-DE': { + 'gantt': { + "id": "Ich würde", + "name": "Name", + "startDate": "Anfangsdatum", + "duration": "Dauer", + "progress": "Fortschritt", + } + } +}); + export const MY_DATE_FORMATS = { parse: { dateInput: 'DD.MM.YYYY', @@ -208,6 +223,11 @@ export class NttGanttComponent implements OnInit { * The function ngOnInit sets values which are required for rendering the gantt Chart. Furthermore it triggers the Dataservice to fetch Changes from the backend and trims the resources (Changes Array) and sets the paginator to the first page. */ public ngOnInit(): void { + setCulture('de-DE'); + loadCldr( + './numbers.json', + './ca-gregorian.json', + ); this.renderGantt = false; this.firstLoad = true; this.sliceStart = 0;