simple-datatables

labels

Type: object

Customise the displayed labels. (v1.0.6 and above)

Defaults

labels: {
    placeholder: "Search...",
    searchTitle: "Search within table",
    pageTitle: "Page {page}",
    perPage: "entries per page",
    noRows: "No entries found",
    info: "Showing {start} to {end} of {rows} entries",
    noResults: "No results match your search query",
}

The strings wrapped in curly braces represent variables that are inserted.

Property Effect Variables
placeholder Sets the placeholder of the search input None
searchTitle Sets the title of the search input None
pageTitle Sets the title of the page (as used in the page navigator) {page} - The current page number
perPage Sets the per-page dropdown's label None
noRows The message displayed when there are no search results None
info Displays current range, page number, etc {start} - The first row number of the current page
{end} - The last row number of the current page
{page} - The current page number
{pages} - Total pages
{rows} - Total rows

Example:

labels: {
    placeholder: "Search employees...",
    searchTitle: "Search within employees",
    perPage: "employees per page",
    noRows: "No employees to display",
    info: "Showing {start} to {end} of {rows} employees (Page {page} of {pages} pages)",
},