1 // DATA_TEMPLATE: js_data
2 oTest.fnStart( "oLanguage.sInfo" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable( {
9 var oSettings = oTable.fnSettings();
12 "Info language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default",
14 function () { return oSettings.oLanguage.sInfo == "Showing _START_ to _END_ of _TOTAL_ entries"; }
18 "Info language default is in the DOM",
20 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; }
25 "Info language can be defined - without any macros",
28 oTable = $('#example').dataTable( {
34 oSettings = oTable.fnSettings();
36 function () { return oSettings.oLanguage.sInfo == "unit test"; }
40 "Info language definition is in the DOM",
42 function () { return document.getElementById('example_info').innerHTML = "unit test"; }
46 "Info language can be defined - with macro _START_ only",
49 $('#example').dataTable( {
52 "sInfo": "unit _START_ test"
56 function () { return document.getElementById('example_info').innerHTML = "unit 1 test"; }
60 "Info language can be defined - with macro _END_ only",
63 $('#example').dataTable( {
66 "sInfo": "unit _END_ test"
70 function () { return document.getElementById('example_info').innerHTML = "unit 10 test"; }
74 "Info language can be defined - with macro _TOTAL_ only",
77 $('#example').dataTable( {
80 "sInfo": "unit _END_ test"
84 function () { return document.getElementById('example_info').innerHTML = "unit 57 test"; }
88 "Info language can be defined - with macros _START_ and _END_",
91 $('#example').dataTable( {
94 "sInfo": "unit _START_ _END_ test"
98 function () { return document.getElementById('example_info').innerHTML = "unit 1 10 test"; }
102 "Info language can be defined - with macros _START_, _END_ and _TOTAL_",
104 oSession.fnRestore();
105 $('#example').dataTable( {
108 "sInfo": "unit _START_ _END_ _TOTAL_ test"
112 function () { return document.getElementById('example_info').innerHTML = "unit 1 10 57 test"; }