M.E.
M.E.

Reputation: 5495

DataTables - Setting language

I want to use datatables using Spanish as language.

I currently use this, following documentation to turn html table into a DataTables:

$('#product_table').DataTable( {
...
} );

However, while checking the official DataTables documentation, I see that .dataTable is used instead of .DataTables.

 $('#example').dataTable( {
        "language": {
            "url": "dataTables.german.lang"
        }
 } );

How can I define the language using the first form .DataTable?

Upvotes: 0

Views: 3313

Answers (2)

Erica B.
Erica B.

Reputation: 31

This one works for me:

$('#product_table').DataTable( {
   language: {
    url: 'http://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json'
   }
} );

Upvotes: 0

ravi polara
ravi polara

Reputation: 572

Refer This link your answer is here.

https://datatables.net/examples/basic_init/language.html

for More Link.

enter link description here

Upvotes: 1

Related Questions