2

want to show titles using i18n Above is the image for showing titles 'items per page'

shiVam_Mak
  • 39
  • 1
  • 8

1 Answers1

1

You need to use MatPaginatorIntl interface and extend it. Here is an example of Serbian labels

export function getSerbianPaginatorIntl() {
  const paginatorIntl = new MatPaginatorIntl();

  paginatorIntl.itemsPerPageLabel = 'Stavki po strani:';
  paginatorIntl.nextPageLabel = 'Sledeca strana';
  paginatorIntl.previousPageLabel = 'Prethodna strana';
  paginatorIntl.getRangeLabel = serbianRangeLabel;

  return paginatorIntl;
}

full example here https://stackblitz.com/edit/angular-5mgfxh-cwgmym?file=app%2Fdutch-paginator-intl.ts

Slobodan Gajić
  • 160
  • 1
  • 12