Search code examples
datatables

How to Change datatable default empty table message


I am using datatable to list and sort the results.

This is how i initialized datatable

$('#example1').DataTable({bFilter: false, bInfo: false, paging: false});

It works fine. But i need to change the default table empty message No data available in table to No records found. Please help.


Solution

  • $('#example').dataTable({
        "oLanguage": {
            "sEmptyTable": "My Custom Message On Empty Table"
        }
    });
    

    Reference: http://datatables.net/forums/discussion/2327/how-to-localize-the-string-no-data-available-in-table