Buttons, API initialized, not showing when using Language file?
Buttons, API initialized, not showing when using Language file?
yuray
Posts: 2Questions: 2Answers: 0
Hi when initializing DT this way, buttons are missing...
var tab= $('#table').DataTable({
buttons: true,
language: {
url: "http://cdn.datatables.net/plug-ins/1.10.9/i18n/English.json"
},
});
tab.buttons().container().appendTo( '#buttonsContainer');
see: http://live.datatables.net/teyaduri/2/edit?html,js,output
- if you comment language part, buttons appear.
If i initialize them via "dom" they are here, but then i cannot place them outside generated "_wrapper".
Also, question is how can i "internalizate" these buttons. I understand i can define "text" property, but i would like to have that values in separate files, for each language.
thanks.
Y
This discussion has been closed.
Answers
Hi,
As the
language.url
documentation states:So you need to wait for that callback: http://live.datatables.net/teyaduri/3/edit .
Unfortunately you also need a small setTimeout because Buttons itself currently uses the
init
event itself. That is something I will fix in an upcoming release.Allan