language.loadingRecords not working, why?

language.loadingRecords not working, why?

JenssonJensson Posts: 2Questions: 1Answers: 0

Hi!
language.loadingRecords, doesn't work, Why?
From this https://datatables.net/reference/option/language.loadingRecords I've tried in numerous ways.

$('#example').dataTable( {
  "ajax": "json.txt",
  "language": {
     "loadingRecords": "Please wait - loading..."
  }
} );

Answers

  • allanallan Posts: 63,836Questions: 1Answers: 10,518 Site admin

    That looks like it should work to me. Can you give me a link to the page showing the issue so it can be debugged please.

    Allan

  • JenssonJensson Posts: 2Questions: 1Answers: 0

    Sorry, It's not on Internet. But I use following code, maybe it helps.

                        var table = $('#AeFirmorVariablerResultTable').DataTable({
                            "oLanguage": {
                                "oPaginationType": "bootstrap",
                                "sLengthMenu": "Visar _MENU_ poster per sida",
                                "sZeroRecords": "Tyvärr inga träffar",
                                "sInfo": "Visar _START_ till _END_ av _TOTAL_ poster.",
                                "sInfoEmpty": "Visar 0 till 0 av 0 poster",
                                "sInfoFiltered": "(filtrerat från totalt _MAX_ antal poster)",
                                "sSearch": "Sök",
                                "loadingRecords": "Laddar...",
                                "oPaginate": {
                                    "sFirst": "Först",
                                    "sLast": "Sist",
                                    "sNext": "Nästa",
                                    "sPrevious": "Föregående"
                                }
                            },
                            orderCellsTop: true,
                            "scrollX": true,
                            "dom": '<"top"l<"RensaFilter"><"VisaFirmaVariabler">ips>r<"LedtextLankar">t<"clear"><"bottom"lp>'
                        });
    
    
  • allanallan Posts: 63,836Questions: 1Answers: 10,518 Site admin

    You aren't using Ajax so there is no loading happening. The data is already in the DOM if you aren't using ajax - hence why you won't see the loading message.

    Allan

This discussion has been closed.