No translation via language-option when no data is available (Showing 0 to 0 of 0 entries)

No translation via language-option when no data is available (Showing 0 to 0 of 0 entries)

kmielkmiel Posts: 4Questions: 2Answers: 0

Hello,

When using the 'language' option, it seems to fall back to English when no data is available. From what I can see now this only seems to be happening with the info part: "Showing 0 to 0 of 0 entries". Bug?

Using a language file, it works fine. However, I don't want to rewrite/modify my language code :-)

Thanks,
Camille

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,822Questions: 1Answers: 10,129 Site admin
    Answer ✓

    Per the forum rules, can you link to a test case showing the issue please. The language.infoEmpty option defines the string to be used when the table is empty. Perhaps that is missing in the translation you are using?

    Allan

  • kmielkmiel Posts: 4Questions: 2Answers: 0

    Completely overlooked that option.

    Thanks Allan.

  • michmich Posts: 1Questions: 0Answers: 0
    edited June 2015

    I used latest angular-datatables, datatables modules:

    .withOption('language', {
    "info": "Showing _START_ to _END_ of _TOTAL_ Customers"
    })"

    Datatables show me "Showing 1 to 5 of 11 Customers" when data is available and "Showing 0 to 0 of 0 entries" when table is empty in any browsers.

    I think that Datatables use "Showing 0 to 0 of 0 entries" default message when table is empty.

    Message should be "Showing 0 to 0 of 0 Customers"

  • allanallan Posts: 61,822Questions: 1Answers: 10,129 Site admin

    Message should be "Showing 0 to 0 of 0 Customers"

    Only if you are showing a table of customers. What if you are showing a table of stock items, or software packages? That is why it is customisable, so you can modify it to suit your needs.

    Allan

This discussion has been closed.