Currently, I am working on a project to develop an Ionic/Angular application. For this application, I am utilizing NGX datatable which is functioning well. However, I have a specific requirement - I need to display boolean values in German instead of English ("true" should be displayed as "Ja" and "false" as "Nein").
The issue arises from the fact that my datatable columns are being automatically generated, resulting in the following HTML structure:
<ngx-datatable [selectionType]="'single'" (select)="openDetailsPage($event)" [messages]="messages"
class="bootstrap" [limit]="10" [rows]="allOpenTickets" [rowHeight]="50" [columns]="columns"
[columnMode]="'force'" [sortType]="'multi'" [headerHeight]="50" [footerHeight]="50"
[rowClass]="getRowClass">
</ngx-datatable>
In my TypeScript file, I define the columns as follows:
this.columns = [
{ name: 'Id', prop: 'id' },
{ name: 'Ziel', prop: 'goalDate', pipe: this.datePipe() },
{ name: 'Erstellt', prop: 'created' , pipe: this.datePipe() },
{ name: 'Titel', prop: 'title' },
{name:'Erledigt',prop:'done'}
];
While I am able to transform dates using a pipe in Angular, I am unsure if there is a similar approach for boolean values. Should I abandon the automatic column generation and create my own instead?
The end goal is to achieve a table layout resembling the following: final table picture