In DataTables is there any way to rename the Show ___ Entries drop down text? Specifically, I have a client who wants to change "Show" to "Display". If memory serves, this is generated by the lengthMenu item, but while I see how to customize the select box options I haven't found any way to change the label.
UPDATE: here is my relevant code.
$("#datatable").dataTable( {
bFilter: false,
"sDom": 'lfptip',
"oLanguage": {
"sLengthMenu": "Display _MENU_ records",
}
"aoColumnDefs": [{ "bSortable": false, "aTargets": [ 9 ] }, { sType: 'datetime-us-flex', aTargets: [0, 4] }, { sType: 'numeric-empty-bottom', aTargets: [7, 8] },
{ "sClass": "col-strong", "aTargets": [ 1 ] }
],
});
You can use this
$('#example').dataTable( {
"oLanguage": {
"sLengthMenu": "Display _MENU_ records",
}
});
from https://datatables.net/docs/DataTables/1.9.beta.1/DataTable.defaults.oLanguage.html#sLengthMenu_details
$('#example').dataTable( {
"oLanguage": {
"sLengthMenu": "Your words here _MENU_ and/or here",
}
});
Demo | Docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With