Internationalisation for Length Menu Inside Button
Internationalisation for Length Menu Inside Button
How do I translate a Length Menu inside a button?
This is what I tried to do:
$(document).ready(function () {
var table = $('#ajaxTable').DataTable({
dom: 'Bfrtip',
lengthMenu: [
[ 10, 25, 50, -1 ],
[ '10 opções', '25 opções', '50 opções', 'Mostrar Todas' ]
// directly translation here works pretty fine
],
buttons: [
'pageLength',
{
extend: 'collection',
text: 'Baixar',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
}
],
"language": {
"sLengthMenu": "Mostrar _MENU_ opções", // tried this
"buttons": {
"sLengthMenu": "Mostrar _MENU_ opções", // and this
}
}
});
});
I have already checked this: http://legacy.datatables.net/usage/i18n#oLanguage.sLengthMenu but it doesn't cover a Length Menu inside a button.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can use the
pageLength
object as described inpageLength
- see here: http://live.datatables.net/sowagihe/1/editColin
I appreciate, Colin!
Thank you very much!!