Internationalisation/localisation of lengthMenu
Internationalisation/localisation of lengthMenu

I want to use the -1 option in lengthMenu as in
$('#example').dataTable( {
"lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ]
} );
but I can't seem to find a way of localising the "All" text. Is there a way in DataTables?
This discussion has been closed.
Replies
No, as it's your own string, you would need to deal with that in your code.
Colin
Thanks. Are there any thoughts about making this a DataTables string in future? I would have thought that everybody would want "All" or their local language equivalent for the -1 option, and so making this a DataTables string would make life much easier for applications using DataTables that have to support many languages.
I think Colin's point is that you'd just do:
But are you meaning that you want to use it inside the
language
object and possibly load it via Ajax? If so, honestly, that's not something I'd thought of before. I'm not sure why as it seems fairly obvious now. I've created an issue for that on our internal tracker (DD-1335), but it might be v2 before that gets addressed.Allan
Thanks. Yes, I'd like a
language.all
option and maybeshould default to
and then it could be overridden by, for example,
Maybe there are better ways of doing it. But certainly a
language.all
option please.Thanks.