Change Search Label


Topic: Change Search Label

nikkiduck asked 5 years ago

Possible to change Datatables "Search:" label?

Search:

Tried via custom jquery but broke search functionality.

Resources (screenshots, code snippets etc.)enter image description here

enter image description here


Mateusz Łubianka staff answered 5 years ago

Hi @nikkiduck,

You can use this code:

<script type="text/javascript">
    $(document).ready(function () {
      $('#dtBasicExample').DataTable({
        oLanguage: {
          "sSearch": "New Text"
        }
      });
      $('.dataTables_length').addClass('bs-select');
    });
  </script>  

Image with the result: enter image description here

Best,


Nashowan Alhadrmi commented 2 years ago

thank you MR ENG what about (Show ) and (entries)


Grzegorz Bujański staff commented 2 years ago

You can add to the oLanguage object "sLengthMenu": "new _MENU_ text"


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.14.1
  • Device: Laptop
  • Browser: Chrome
  • OS: Mac OS Catalina
  • Provided sample code: No
  • Provided link: No