DataTables with English language and semantic-ui

1

I'm trying to implement this tool that I found absolutely marvelous: Data Tables + Semantic UI

Now, download the js and css reference, and I still see the parts of the table in English. I want to clarify that I edited the file jquery.dataTables.min.js and replaced all the items that were in English and still continues to show me everything in English:

SOLUTION

THANKS TO THE CONTRIBUTION OF THE FRIEND WHO GUIDED ME, he passed me a code that did not really work in the example, but I looked in the documentation of the site and found something that did work:

<script>
$(document).ready(function() {
    $('#tabla').DataTable({
      language: 
      {
        "sProcessing":     "Procesando...",
        "sLengthMenu":     "Mostrar _MENU_ registros",
        "sZeroRecords":    "No se encontraron resultados",
        "sEmptyTable":     "Ningún dato disponible en esta tabla",
        "sInfo":           "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
        "sInfoEmpty":      "Mostrando registros del 0 al 0 de un total de 0 registros",
        "sInfoFiltered":   "(filtrado de un total de _MAX_ registros)",
        "sInfoPostFix":    "",
        "sSearch":         "Buscar: ",
        "sUrl":            "",
        "sInfoThousands":  ",",
        "sLoadingRecords": "Cargando...",
        "oPaginate": {
          "sFirst":    "Primero",
          "sLast":     "Último",
          "sNext":     "Siguiente",
          "sPrevious": "Anterior"
        },
        "oAria": {
          "sSortAscending":  ": Activar para ordenar la columna de manera ascendente",
          "sSortDescending": ": Activar para ordenar la columna de manera descendente"
        }
      }
      });
    });
</script>

Now I upload an image of how it was:

    
asked by MNibor 30.06.2017 в 16:43
source

1 answer

1

You can change the language when you declare the Datatable with the property language

leaving the code something like this: (these are only some properties if you want to change icons or other properties but see this link )

var table = $('#DataTablesClientes').DataTable({
    language: {
        "decimal": "",
        "emptyTable": "No hay información",
        "info": "Mostrando _START_ a _END_ de _TOTAL_ Entradas",
        "infoEmpty": "Mostrando 0 to 0 of 0 Entradas",
        "infoFiltered": "(Filtrado de _MAX_ total entradas)",
        "infoPostFix": "",
        "thousands": ",",
        "lengthMenu": "Mostrar _MENU_ Entradas",
        "loadingRecords": "Cargando...",
        "processing": "Procesando...",
        "search": "Buscar:",
        "zeroRecords": "Sin resultados encontrados",
        "paginate": {
            "first": "Primero",
            "last": "Ultimo",
            "next": "Siguiente",
            "previous": "Anterior"
        }
    },
    ....
});
  

Recommendation:
  I suggest you never edit the files of third parties unless the license allows it, otherwise it is better to implement a function that makes those changes you want, making it clear that this does not implement a method or property to make such a change.

    
answered by 30.06.2017 / 16:50
source