DataTable Paginator Text i18n

UI Components for Vue
Post Reply
AJackson19
Posts: 10
Joined: 31 Aug 2021, 15:00

13 Dec 2021, 12:57

How can I translate DataTable Paginator text properly? Is there an example?

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

14 Dec 2021, 13:50

There is an example https://primefaces.org/primevue/showcas ... /paginator.

You could change the 'currentPageReportTemplate' property.

AJackson19
Posts: 10
Joined: 31 Aug 2021, 15:00

15 Dec 2021, 10:22

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>

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests