Loading language file dynamically doesn't work when using HTML5 data attributes

Loading language file dynamically doesn't work when using HTML5 data attributes

jqnatividadjqnatividad Posts: 6Questions: 3Answers: 0

Awesome plugin!
However, when I use HTML5 data attributes to init the datatable, and then try to load a language file afterwards in javascript, the language is not loaded. Language modifications in javascript also don't work - i.e..

$('#example').DataTable() = ({language: { searchPlaceholder="Search"}});

But it does work when I load the language url or try to customize it in the HTML data attribute definition.

Thanks in advance!

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 14,175Questions: 25Answers: 3,345
    Answer ✓

    The language isn't dynamically updatable. You can destroy and reinit datatables or manually make the updates. See this thread and this thread for more details.

    Kevin

Sign In or Register to comment.