Why isn't oLanguage.sInfo working for me?

Why isn't oLanguage.sInfo working for me?

orange_roughyorange_roughy Posts: 19Questions: 0Answers: 0
edited February 2011 in General
Hi,

[code]
var dt = $(id).dataTable(
{ "aoColumnDefs": [{"aTargets": [0], "bSortable":true},{"aTargets": [1], "bSortable":true},{"aTargets": [2], "bSortable":true},{"aTargets": [3], "bSortable":true},{"aTargets": [4], "bSortable":true},{"aTargets": [5], "bSortable":true}],
"bScrollCollapse": true,
"sScrollY": "200px",
"sDom":"lrtip", // removes global search box per http://datatables.net/usage/options#sDom
"bSortClasses": false,
"iDisplayLength": 20,
"bScrollInfinite": true,
"oLanguage.sEmptyTable": "No data",
"oLanguage.sInfoEmpty": "No data",
"oLanguage.sInfo": "hey",
"bDestroy": true, // todo: optimize this. we don't need to destroy.
"aaSorting": [[1, "asc" ]]});
[/code]

I've specified oLanguage.sInfo but it's not taking effect: I still see "Showing 1 to 2 of 2 entries". What am I doing wrong?

thanks,
orange roughy

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    oLanguage should be an object - the string property your given "oLanguage.sInfo" and friends, isn't something DataTables will pick up. Have a look at the example in the documentation for how it can be used correctly: http://datatables.net/usage/i18n#oLanguage.sInfo

    Allan
  • orange_roughyorange_roughy Posts: 19Questions: 0Answers: 0
    That was it... thanks!
This discussion has been closed.