django-datatable-view icon indicating copy to clipboard operation
django-datatable-view copied to clipboard

Setting the "oLanguage" datatable option is not completely respected

Open ghost opened this issue 11 years ago • 2 comments

Setting something like this:

<script type="text/javascript">
    datatableview.auto_initialize = false;
    var options = {
        "oLanguage": {
            "sUrl": "{{STATIC_URL}}/js/datatables/language.{{ LANGUAGE_CODE }}.json"
        }
    };
    datatableview.initialize($('.datatable'), options);
</script>

...gets some of the strings translated but not all of them, i.e.: "Showing nnn to nnn of nnnn entries" stays the same.

The same option with the same oLanguage setting works flawlessly on a normally initialized datatable.

Any ideas why ?

ghost avatar Apr 28 '14 18:04 ghost

Ah, I believe this is a problem with our naive implementation of that line of text. I've ignored this for too long! I will investigate how to get it using the strings from the datatables language files, and I'll update here with what I find.

tiliv avatar Apr 28 '14 18:04 tiliv

Well, let me know if you'd like me to help.

Thanks.

ghost avatar Apr 28 '14 18:04 ghost