Buttons disappear when language url is loaded instead of code
Buttons disappear when language url is loaded instead of code
Hi,
When initializing datatables I use language : <json stuff>
However, if I set url : <file.json> (with same contents, in this case Swedish.json downloaded from datatables.net) then the buttons disappear.
Check out debug code ovelax
Best regards,
Mats
{
"sEmptyTable": "Tabellen innehåller ingen data",
"sInfo": "Visar _START_ till _END_ av totalt _TOTAL_ rader",
"sInfoEmpty": "Visar 0 till 0 av totalt 0 rader",
"sInfoFiltered": "(filtrerade från totalt _MAX_ rader)",
"sInfoPostFix": "",
"sInfoThousands": " ",
"sLengthMenu": "Visa _MENU_ rader",
"sLoadingRecords": "Laddar...",
"sProcessing": "Bearbetar...",
"sSearch": "Sök:",
"sZeroRecords": "Hittade inga matchande resultat",
"oPaginate": {
"sFirst": "Första",
"sLast": "Sista",
"sNext": "Nästa",
"sPrevious": "Föregående"
},
"oAria": {
"sSortAscending": ": aktivera för att sortera kolumnen i stigande ordning",
"sSortDescending": ": aktivera för att sortera kolumnen i fallande ordning"
}
}
This discussion has been closed.
Answers
Thanks for your question. As noted in the forum rules, please post a link to a test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Allan
Hi Matola,
I have the same problem. Could you solve it?
thx
Bernhard
Hi @belu ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi there,
I've had quite a similar issue that looks that it's related, so here it comes.
I followed the guide Individual column searching (text inputs) and the filters were working fine until I added the language {url:...} option to the table. Then the filter never matches any record. I've isolated all options to the table and it's the only change to break it.
I created a test case so you can have a look a it: Test case. If you comment the language option, the filters work fine, if you uncomment the line, the filters never match.
Cheers,
D.
PS: Using version 1.10.19, just to clarify .
As the
language.url
documentation says:Updated example with that: http://live.datatables.net/yibojipu/2/edit
Allan
Hi,
@allan : Thanks a lot, that helped - I initialized the buttons within the initComplete und it worked. I am very grateful for that help!
@GreenEyed : the column searching works fine as well in this constellation!
@allan Thanks, that explains it. I moved the code inside the initComplete and that was it.