How do I translate the "type here..." string and "All" string in my datatables?

How do I translate the "type here..." string and "All" string in my datatables?

BethSchragBethSchrag Posts: 2Questions: 1Answers: 0

I have the nationalization working, but it doesn't translate the "type here..." string in the search field or the "All" at the end of the length menu. Does anyone know how I can do that?
Thanks!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    edited March 2015 Answer ✓

    but it doesn't translate the "type here..." string in the search field

    What "type here..." string? DataTables doesn't have a default placeholder, although you can set one using language.searchPlaceholder.

    the "All" at the end of the length menu

    Use the lengthMenu options to customise that - All is not in the DataTables defaults, so that must be getting loaded from somewhere else.

    Allan

  • BethSchragBethSchrag Posts: 2Questions: 1Answers: 0

    Thank you, allan,
    searchPlaceholder was helpful for translating the "type here..." string in my search fields.
    I am still looking for a way to translate the "All" in length menu.

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin

    For the All, simply put the language string you want into the lengthMenu option.

    Allan

This discussion has been closed.