datatable添加中文支持
<table id="datatable" class="table table-bordered table-striped" >
<script>
$(function () {
$('#datatable').DataTable({
'paging' : true,
'lengthChange': true,
'searching' : true,
'ordering' : true,
'info' : true,
'autoWidth' : false,
language: {
"decimal": "",
"emptyTable": "No data available in table",
"info": "显示 _START_ 到 _END_ 页共 _TOTAL_ 条",
"infoEmpty": "显示 0 到 0 页共 0 条",
"infoFiltered": "(filtered from _MAX_ total entries)",
"infoPostFix": "",
"thousands": ",",
"lengthMenu": "显示 _MENU_ 条",
"loadingRecords": "Loading...",
"processing": "Processing...",
"search": "Search:",
"zeroRecords": "没有匹配项",
"paginate": {
"first": "First",
"last": "Last",
"next": "下页",
"previous": "上页"
},
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
},
});
});
</script>