Setting "All"-Option of pageLength Button translation to number of total rows

Setting "All"-Option of pageLength Button translation to number of total rows

digibloggerdigiblogger Posts: 1Questions: 1Answers: 0
edited February 2019 in Free community support

Hi there,

actually, I am using a plugin to enable datatables on my wordpress website. Basicly, it just wraps the options in a shortcode tag set them and asks for an table ID to be applied to.

I succeeded in translating nearly everything, but the pageLength button is a bit tricky, so I have to ask you guys.

Actually, my page menu is set like this

lengthMenu: [ [10, 25, 50, -1], [10, 25, 50, "Alle"] ],

And for the language:

language: {
buttons: {
  pageLength: {
                _: "%d Zeilen",
                "-1": "Alle Zeilen"
}}}

That works in that way that when user selects "Alle", the Text "Alle Zeilen" is shown.

But I want to have a little more.

How can I configure the language for option "-1" to output "TotalNumberOfRows Zeilen"

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @digiblogger ,

    The example on this page here looks like it's doing what you want:

    {'-1': 'Show all rows', _: 'Show %d rows'}
    

    Cheers,

    Colin

This discussion has been closed.