1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01:00

New: Add a thousands seperator option to the language options. As a displayed string in DataTables this should be configurable, and now is with the oLanguage.sInfoThousands options ( "oLanguage": { "sInfoThousands": "'" } for example).

This commit is contained in:
Allan Jardine 2011-08-30 18:20:59 +01:00
parent b93d6bc243
commit e87798781b

View File

@ -974,6 +974,7 @@
"sInfoEmpty": "Showing 0 to 0 of 0 entries", "sInfoEmpty": "Showing 0 to 0 of 0 entries",
"sInfoFiltered": "(filtered from _MAX_ total entries)", "sInfoFiltered": "(filtered from _MAX_ total entries)",
"sInfoPostFix": "", "sInfoPostFix": "",
"sInfoThousands": ",",
"sSearch": "Search:", "sSearch": "Search:",
"sUrl": "", "sUrl": "",
"oPaginate": { "oPaginate": {
@ -1368,7 +1369,7 @@
{ {
if ( i%3 === 0 && i !== 0 ) if ( i%3 === 0 && i !== 0 )
{ {
out = ','+out; out = this.oLanguage.sInfoThousands+out;
} }
out = a[iLen-i-1]+out; out = a[iLen-i-1]+out;
} }
@ -2481,6 +2482,7 @@
_fnMap( oSettings.oLanguage, oLanguage, 'sInfoEmpty' ); _fnMap( oSettings.oLanguage, oLanguage, 'sInfoEmpty' );
_fnMap( oSettings.oLanguage, oLanguage, 'sInfoFiltered' ); _fnMap( oSettings.oLanguage, oLanguage, 'sInfoFiltered' );
_fnMap( oSettings.oLanguage, oLanguage, 'sInfoPostFix' ); _fnMap( oSettings.oLanguage, oLanguage, 'sInfoPostFix' );
_fnMap( oSettings.oLanguage, oLanguage, 'sInfoThousands' );
_fnMap( oSettings.oLanguage, oLanguage, 'sSearch' ); _fnMap( oSettings.oLanguage, oLanguage, 'sSearch' );
if ( typeof oLanguage.oPaginate != 'undefined' ) if ( typeof oLanguage.oPaginate != 'undefined' )