language.search not working for me
language.search not working for me
CmdrBeavis
Posts: 5Questions: 2Answers: 0
I have tried multiple permutations of the following example [that I got from the documentation]
$('#example').dataTable( {
"language": {
"search": "Filter records:"
}
} );
and all I see is [still] good old "Search: "
By "multiple permutations" I mean I've tried using single quotes, double quotes, no quotes (on the keys 'language' and 'search'), etc. Here is [what I'm assuming are the relevant parts of] my table definition;
cellModemDataTable = $("#grid-data").DataTable({
"processing": true,
"serverSide": true,
"language": {
search: 'Enter S/N, SIM ID, IMEI, or IMSI: ',
searchPlaceholder: 'Enter value here'
},
"ordering": true,
"searching": true,
"ajax": {
"url": "/Controller/Search",
"contentType": "application/json; charset=utf-8",
"dataSrc": "data",
"type": "GET"
...
And here's the table markup.
<div class="row results" id="dataTables-wrapper"> @*style="display:none"*@
<table class="table display cell-border" id="grid-data" cellspacing="1"></table>
</div>
Any help figuring this out appreciated!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I am using this too but only for the table defaults if the language is German. This works:
And this works for Editor:
Well humph, it magically started working. Seriously, the only thing I changed was the addition of the 'name' property in my columns: [] definitions.
The Editor language didn't work to me. Where do i have to put it on?
here?
var editor = new $.fn.dataTable.Editor( {
})
I've got that, thanks
https://editor.datatables.net/examples/simple/i18n.html