How to change DataTables text `Showing page 1 of 5 of x entries`?

Viewed 39413

I'm using DataTables and I'm trying to change the default text Showing 1 to 10 of 57 entries to something like Total 57 and when there is no data No Data found. I changed the info property but it seems like it's taking no affect.

$(document).ready(function() {
    $('#example').DataTable( {
        "language": {
            "lengthMenu": "Display _MENU_ records per page",
            "zeroRecords": "No Data Found",
            "info": "Total",
            "infoEmpty": "No records available",
            "infoFiltered": "(filtered from _MAX_ total records)"
        }
    });
});

Any ideas on how to achieve this? Thanks.

3 Answers

Try emptyTable for when there are no entries.

$(document).ready(function() {
    $('#example').DataTable({
        language: {
                emptyTable: "No records available"
            }
    });
});
Related