Home > database >  How to change default texts in datatable?
How to change default texts in datatable?

Time:01-23

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"  >
    <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

CodePudding user response:

I hope this link can help you https://datatables.net/reference/option/language

CodePudding user response:

<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>
  •  Tags:  
  • Related