AdaptTable for NG-ZORRO

Right-to-left NG-ZORRO data table

Arabic labels and cell values mirror the table, its pager and the filter popover. Pinning uses logical edges, so start is the right edge.

Pass getLabels("ar") to labels and getDirection("ar") to dir. Every table, including nested tables, receives the same presentation settings.

Append ?locale=ar&dir=rtl to any Angular feature page to exercise its real table in Arabic and right-to-left layout.

The code

import { Component, input } from "@angular/core";
import type { ColumnDef } from "@adapttable/angular";
import { getDirection, getLabels } from "@adapttable/i18n";
import { AdaptDataTable } from "@adapttable/ng-zorro";
import { filters } from "@adapttable/ng-zorro/filters";

@Component({
  selector: "app-arabic-people",
  imports: [AdaptDataTable],
  template: `
    <adapt-data-table
      [data]="rows()" [columns]="columns()" [rowKey]="rowKey"
      [dir]="dir" [labels]="labels" [features]="features"
      filtersMode="popover"
    />
  `,
})
export class ArabicPeople {
  readonly rows = input.required<readonly Person[]>();
  readonly columns = input.required<readonly ColumnDef<Person>[]>();
  readonly rowKey = (row: Person) => row.id;
  readonly dir = getDirection("ar");
  readonly labels = getLabels("ar");
  readonly features = [filters([{ key: "name", type: "text", label: "الاسم" }])];
}

Install

pnpm add @adapttable/ng-zorro @adapttable/angular @adapttable/core ng-zorro-antd @angular/forms @angular/router

The same feature in the other kits

More NG-ZORRO features

Reference: i18n-rtl. More of this kit: AdaptTable for NG-ZORRO, or the live demo.