Translate button pageLength inside language file .json
Translate button pageLength inside language file .json
itajackass
Posts: 165Questions: 49Answers: 3
I don't know how to set this translation inside json file to prevent to modify all datatables in all pages.....
$('#myTable').DataTable( {
dom: 'Bfrtip',
language: {
buttons: {
pageLength: {
_: "Afficher %d éléments",
'-1': "Tout afficher"
}
}
},
buttons: [
'pageLength'
]
} );
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Please see this thread which discusses exactly the same thing.
Allan
I already tried to insert
insert languages/italian.json file but it doesn't work
As I noted in the other thread, you need to use
lengthMenu
. There is no option in the language file (yet) to add a translation for the "All" text.Allan
Did you try this way?
https://datatables.net/extensions/buttons/examples/column_visibility/text.html
"language": {buttons : { pageLength: "%d linhas" //Translate to whatever you need},}