DataTable Paginator Text i18n
-
- Posts: 10
- Joined: 31 Aug 2021, 15:00
How can I translate DataTable Paginator text properly? Is there an example?
-
- Posts: 560
- Joined: 23 Oct 2020, 09:28
There is an example https://primefaces.org/primevue/showcas ... /paginator.
You could change the 'currentPageReportTemplate' property.
You could change the 'currentPageReportTemplate' property.
-
- Posts: 10
- Joined: 31 Aug 2021, 15:00
If anyone wonders how to do this, i did it this way,
Code: Select all
<DataTable
class="p-datatable-sm p-datatable-gridlines"
stripedRows
:rowHover="true"
:value="engines"
:lazy="true"
:paginator="true"
:rows="10"
ref="dt"
:totalRecords="totalRecords"
:loading="loading"
@page="onPage($event)"
@sort="onSort($event)"
responsiveLayout="scroll"
paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown"
:rowsPerPageOptions="[10, 25, 50]"
:currentPageReportTemplate="
this.$primevue.config.locale.paginationShowingText +
' ' +
`{first}` +
' ' +
this.$primevue.config.locale.paginationToText +
' ' +
`{last}` +
' ' +
this.$primevue.config.locale.paginationOfText +
' ' +
`{totalRecords}` +
' ' +
this.$primevue.config.locale.paginationEntryText
"
> </DataTable>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 8 guests