Asped Asped -4 years ago 166
Javascript Question

Datatables oLanguage (internationalisation) default setting

I have a problem with setting up i18n in datatables.
I know there is the oLanguage setting, which can point to an url, or which can be naually overwritten. But the problem is, that I need to to be set for ALL datatables on the page.
Any other settings can be preset by extending the default options, but this does not work with the oLanguage for some reason.

// set up defaults for datatables
$.extend( $.fn.dataTable.defaults, {
"bFilter": false,
"bProcessing": true,
"sPaginationType": "full_numbers",
"sDom": 'rtp',
"oLanguage": {
"sUrl": "themes/simple/javascript/dataTables-sk.js"
"bServerSide": true


When I do it at initialisation, it works:

$('table').dataTable( {
"oLanguage": {
"sUrl": "themes/simple/javascript/dataTables-sk.js"

Any idea where the problem is?

Answer Source

I haven't found out anything more about this. It seems to be a very specifi bug to a specific system (I was using the Silverstripe framework), and on any other system/framework this works without any problems

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download