Is it possible to load language information from remote file for DataTables.Editor?

Is it possible to load language information from remote file for DataTables.Editor?

4xy4xy Posts: 1Questions: 1Answers: 0

There is the language.url option for DataTable itself, but I see no similar for the Editor. Does it exist? Or may be it's planned in future? It would be very nice to have translations for all editor instances in one file.

Regards.

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Hi,

    Currently you would need to do something like:

    $.getJSON( url, function ( json ) {
      var editor = new $.fn.dataTable.Editor( {
        // ...
        i18n: json.language
      } );
    } );
    

    Having Editor do that is something we do indeed hope to introduce in future.

    Allan

This discussion has been closed.