Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
How to change default texts in datatable?

I create a data table in my HTML template. It works totally good but I have an issue. I did not create my project in English. So, I have to change some text in the table. Like "search" should be "ara" etc... How can I do that?

<table id="example" class="display table  table-hover grid_" >
    <thead>
        <tr>
            <th>Kullanıcı</th>
            ...
        </tr>
    </thead>
    <body>
    ...
    </tbody>
</table>
<script>
        $(document).ready(function() {
            $('#example').DataTable( {
                select: true
            } );
        } );
</script>

Note: I marked the texts that I want to change. datatable

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

To change the default texts of datatable, you'll need to fix it while initializing the datatable. There are two methods by which you can include internationalization options in DataTables - loading the language file through an Ajax request (language.url), or at initialization time using the language property. The following example shows how to include the Turkish translation as an Ajax file:

$(document).ready(function() {
    $('#example').DataTable( {
        language: {
            url: 'dataTables.turkish.json'
        }
    });
});

Or, you can change the default texts by using the language option while initializing the datatable. Here is the example:

$(document).ready(function() {
    $('#example').DataTable({
        language: {
            "emptyTable": "No data available in table",
            "lengthMenu": "Show _MENU_ entries",
            "info": "Showing _START_ to _END_ of _TOTAL_ entries",
            "infoEmpty": "Showing 0 to 0 of 0 entries",
            "search": "Search:",
            "paginate": {
                "first": "First",
                "last": "Last",
                "next": "Next",
                "previous": "Previous"
            },
        }
    });
});

You can also check this links: https://datatables.net/reference/api/i18n() https://datatables.net/reference/option/language

about 4 years ago · Juan Pablo Isaza Report

0

<script>
    $(document).ready(function() {
        $('#example').DataTable( {
            "language": {
                "lengthMenu": "Sayfa başına _MENU_ kayıt göster",
                "zeroRecords": "Kayıt Bulunamadı",
                "info": " _PAGE_ / _PAGES_",
                "search": "Ara",
            }
        } );
    } );
</script>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!