Reputation: 47
I have an app on angular 6 , who i can change the text (previous and next) on my pagination table? im ussing "ngx-pagination": "^3.2.1", i have this and its works ok but the 'previousPage' doesnt change, the rest its ok
"let s of datos | paginate : { itemsPerPage: 10, currentPage : pageActual, previousPage: 'something' }"
<< Previous 1 2 3 Next >>
i want change languaje like this
<< something text 1 2 3 another text >>
thanks
Upvotes: 1
Views: 693
Reputation: 1
You can translate 'Previous' and 'Next' using i18n-attribute like:
<pagination-controls (pageChange)="PageChanged($event)" i18n-previousLabel= "previousLabeltag" previousLabel="Previous" i18n-nextLabel="nextLabeltag" nextLabel="Next"></pagination-controls>
Upvotes: 0
Reputation: 1523
You can implement a custom translation pipe which uses a dictionary created by you to replace corresponding word with the key you provide.
I've prepared a small POC for you in StackBlitz, check here.
Upvotes: 2