[solved] pageLength language with '-1' as javascript object key/property name?
[solved] pageLength language with '-1' as javascript object key/property name?
CodeBrauer
Posts: 2Questions: 1Answers: 0
In the 3rd example of this https://datatables.net/reference/button/pageLength:
$('#myTable').DataTable( {
dom: 'Bfrtip',
language: {
buttons: {
pageLength: {
_: "Show %d entries",
-1: "Show all entries" // « This will not work in JS, right?
}
}
},
buttons: [
'pageLength'
]
} );
So how can I translate this?
This discussion has been closed.
Answers
Javascript is just ****
works:
'-1': "Alle Einträge anzeigen"
- (property as a string)Good point - it would need to be quoted!
Fix for the docs committed and I'll push it out to the site soon.
Regards,
Allan