button-inc / emissions-elt-demo

2 stars 0 forks source link

refactor: MUI datatable localization #198

Open shon-button opened 1 year ago

shon-button commented 1 year ago

If decision to implement MUI DataTable then localization can be done through the options property textLabels.

const options = { ... textLabels: { body: { noMatch: "Sorry, no matching records found", toolTip: "Sort", columnHeaderTooltip: column => Sort for ${column.label} }, pagination: { next: "Next Page", previous: "Previous Page", rowsPerPage: "Rows per page:", displayRows: "of", }, toolbar: { search: "Search", downloadCsv: "Download CSV", print: "Print", viewColumns: "View Columns", filterTable: "Filter Table", }, filter: { all: "All", title: "FILTERS", reset: "RESET", }, viewColumns: { title: "Show Columns", titleAria: "Show/Hide Table Columns", }, selectedRows: { text: "row(s) selected", delete: "Delete", deleteAria: "Delete Selected Rows", }, } ... }