oLanguage issue

oLanguage issue

frenzyfrenzy Posts: 21Questions: 0Answers: 0
edited February 2012 in General
Hi,

I am using 'oLanguage' option when initializing my datatable, and the translations work great for all cases, except when there are no returned records (iTotalDisplayRecords = 0). What could be the cause of this behavior?

Thanks.

Replies

  • allanallan Posts: 61,438Questions: 1Answers: 10,050 Site admin
    Did you set sZeroRecords as well?

    Allan
  • frenzyfrenzy Posts: 21Questions: 0Answers: 0
    Yeah, I set it, and sZeroRecords label also works fine. The 'i' part of sDOM does not get translated when zero records are returned, and it shows the information in English which is default:
    "Showing 0 to 0 of 0 entries".
  • allanallan Posts: 61,438Questions: 1Answers: 10,050 Site admin
    Ah - if there are no records in the table (regardless of filtering) then sEmptyTable is the translated parameter.

    Allan
  • frenzyfrenzy Posts: 21Questions: 0Answers: 0
    If I use sEmptyTable it is just shown in preference to sZeroRecords, as specified in documentation. However, the default 'i' string remains: "Showing 0 to 0 of 0 entries"
  • allanallan Posts: 61,438Questions: 1Answers: 10,050 Site admin
    Can you link me to your page please?
  • frenzyfrenzy Posts: 21Questions: 0Answers: 0
    ah, I have found the problem. There is a bug in Croatian translation on http://datatables.net/plug-ins/i18n. It says: "sInfoEmtpy" instead of "sInfoEmpty".
  • allanallan Posts: 61,438Questions: 1Answers: 10,050 Site admin
    Thanks for finding that! I've just corrected the plug-in page - the Romanian translation had the same issue...

    Allan
  • frenzyfrenzy Posts: 21Questions: 0Answers: 0
    No problem Allan! I'm glad I helped a lil bit to improve this fantastic piece of work!
This discussion has been closed.