I want to integrate the translator plug in and export to excel
I want to integrate the translator plug in and export to excel
$(document).ready(function() {
var table = $('#tabla1').DataTable({
lengthChange: false,
buttons: [ 'copy', 'excel', 'pdf', 'colvis' ],
"columnDefs": [
{ "orderable": false, "targets": 7 },
{ "orderable": false, "targets": 8 },
{ "orderable": false, "targets": 9 },
{ "orderable": false, "targets": 10 },
],
"pageLength":100,
});
table.buttons().container()
.appendTo( '#tabla1_wrapper .col-md-6:eq(0)' );
});
I want to integrate the translator plug in
$(document).ready(function() {
$('#tabla1').DataTable({
"language": {"url": '/datatable/Spanish.json'},
});
the 2 work separately but I can't add "language": {"url": '/datatable/Spanish.json'}, to the first example
Answers
Move the language option on line 3 into the datatable init code in the first snippet.
Kevin