Translation for DataTable

This commit is contained in:
Kevin Röbert
2018-06-13 17:51:02 +02:00
parent 2a2ca598fe
commit f064d46414
62 changed files with 1798 additions and 1 deletions

View File

@@ -42,11 +42,26 @@ function getLog()
}
}
$('#logTable').DataTable({
"pageLength": 10
"pageLength": 10,
"language": {
"url": getDataTableTranslation()
}
} ).order([3, 'desc']).draw();
});
}
/**
* Get the translation file for the DataTable
*/
function getDataTableTranslation()
{
var lang = browser.i18n.getUILanguage();
lang = lang.substring(0,2);
var file = browser.extension.getURL('./external_js/dataTables/i18n/'+lang+'.lang');
return file;
}
/**
* Convert timestamp to date
*/