≡
×
Plus
Manual
Examples
Reference
Download
Blog
Community
Support
Replace "entries" with a custom string
Replace "entries" with a custom string
trhaynes
Posts: 4
Questions: 0
Answers: 0
November 2011
edited November 2011
in
General
I'd like my tables to have "Showing 1 to 2 of 2 users" or "Showing 1 to 2 of 2 reports" instead of the standard "entries." Is there an easy way to do this?
Thanks.
-tom
Replies
fbas
Posts: 1,094
Questions: 4
Answers: 0
November 2011
You can customize various language elements, including the 'entries' info text, by passing in an
oLanguage
object
http://www.datatables.net/ref#oLanguage note that _START_, _END_, and _TOTAL_ are pseudo-variables that will be macro replaced in the text.
[code]$(document).ready(function() {
$('#example').dataTable( {
"oLanguage": {
"sInfo": "Showing _START_ to _END_ of _TOTAL_ reports"
}
} );
} );[/code]
trhaynes
Posts: 4
Questions: 0
Answers: 0
November 2011
Perfect, thanks!
This discussion has been closed.
Replies
http://www.datatables.net/ref#oLanguage note that _START_, _END_, and _TOTAL_ are pseudo-variables that will be macro replaced in the text.
[code]$(document).ready(function() {
$('#example').dataTable( {
"oLanguage": {
"sInfo": "Showing _START_ to _END_ of _TOTAL_ reports"
}
} );
} );[/code]