want to show titles using i18n Above is the image for showing titles 'items per page'
Asked
Active
Viewed 484 times
1 Answers
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
-
thanks for the answer but I want to manage multiple languages so I manage to do it with transloco using angular service. – shiVam_Mak Apr 10 '20 at 12:45
-
2https://stackoverflow.com/a/53877024/7733592 this helps me to do for multiple langs – shiVam_Mak Apr 10 '20 at 12:48