Bug with Internationalisation
Bug with Internationalisation
I got this error: TypeError: oAria is undefined
(the error is in 4590 line of jquery.dataTables.js file version 1.10.2)
It happens when I use internationalisation like this one: http://www.datatables.net/plug-ins/i18n/Polish
I use version 1.10.2 and it happens also on 1.9.4 as far as I checked.
The bug happens when I use a function oTable.fnSort( [ [5,'desc'] ] );
to sort some column by default.
My code is here: http://jsfiddle.net/uszt9xyy/
$(document).ready(function() {
var oTable = $('#example').dataTable({
oLanguage: {
"sUrl": "data_tables.txt"
}
});
oTable.fnSort( [ [4,'desc'] ] );
} );
Here is live "working" version: http://kelostrada.pl/upload/test.html
This question has accepted answers - jump to:
Answers
@up - I think it's a proper bug report, so please look into it.
The problem is that you are calling
fnSort
before the Ajax language file has been loaded. What you should do is useinitComplete
:Or better yet, it you want to set a default sort, just use the
order
option:Allan
My bad then, sorry and thank you :) I think
order
doesn't work in 1.9.xNo - in 1.9- it was called aaSorting .
Allan
Oh thank you, I was looking for that.