Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

263
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda