Replace "entries" with a custom string

Replace "entries" with a custom string

trhaynestrhaynes Posts: 4Questions: 0Answers: 0
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

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    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]
  • trhaynestrhaynes Posts: 4Questions: 0Answers: 0
    Perfect, thanks!
This discussion has been closed.