aLengthMenu & language file

aLengthMenu & language file

OldOld Posts: 2Questions: 0Answers: 0
edited September 2012 in DataTables 1.9
[code]"iDisplayLength": 5,
"aLengthMenu": [[5,10,25,50,100,-1], [5,10,25,50,100,"All"]],
"oLanguage": {
"sUrl": "languages/*.txt"
},[/code]

How insert "All" in the language file for translation?

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,450 Site admin
    Currently there is no way to do that I'm afraid. You need to either modify the DOM that is created by DataTables, replacing the word 'All' by what is loaded from the language file, or put the translation directly into the aLengthMenu option.

    Allan
  • OldOld Posts: 2Questions: 0Answers: 0
    edited September 2012
    I can't put the translation directly into the aLengthMenu option, because it is a multi-language website. How to modify the DOM that is created by DataTables, replacing the word 'All' by what is loaded from the language file?
  • daxpablodaxpablo Posts: 1Questions: 0Answers: 0
    edited December 2012
    Hi allan and Old.
    I'm from Argentine and speak spanish, so please, excuse my english.
    Thank allan for this awesome thing called "DataTables".
    I had the same problem that Old:
    [quote]How insert "All" in the language file for translation?[/quote]
    and solved whit this option on initialization:
    [code] "aLengthMenu": [[10, 25, 50, 100, data.iTotalRecords], [10, 25, 50, 100, "Todos"]], [/code]

    [quote] data.iTotalRecords [/quote] is info from server side that is used for pagination.
This discussion has been closed.