Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

I am currently using angular-datatables.

How can I see the interface of the table in other languages?

I mean the "Show entries", "Search:", "Showing 1 to 10 of 20 entries" literals fore example in Spanish.

Regards

share|improve this question
up vote 1 down vote accepted

You need to define a language struct like this (danish implementation, what I am using in my angular-datatables apps) :

var language = {
  "sEmptyTable": "Ingen tilgængelige data (prøv en anden søgning)",
  "sInfo": "Viser _START_ til _END_ af _TOTAL_ rækker",
  "sInfoEmpty": "Viser 0 til 0 af 0 rækker",
  "sInfoFiltered": "(filtreret ud af _MAX_ rækker ialt)",
  "sInfoPostFix": "",
  "sInfoThousands": ",",
  "sLengthMenu": "Vis _MENU_ rækker",
  "sLoadingRecords": "Henter data...",
  "sProcessing": "Processing...",
  "sSearch": "Filter:",
  "sZeroRecords": "Ingen rækker matchede filter",
  "oPaginate": {
    "sFirst": "Første",
    "sLast": "Sidste",
    "sNext": "Næste",
    "sPrevious": "Forrige"
  },
  "oAria": {
    "sSortAscending": ": activate to sort column ascending",
    "sSortDescending": ": activate to sort column descending"
  }
}

There is a bunch of languages here -> https://www.datatables.net/plug-ins/i18n/

And then you include the language using the withLanguage() option method

.withLanguage(language)

demo -> http://plnkr.co/edit/RCrqM3z7qwsUfFwy8HE6?p=preview

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.