Switch datatables table language with using polylang plugin

I’m playing around with the polylang plugin in wordpress and I have to say that it does good job for me. However, I have one issue I want to solve.

In my website I also use datatables plugin, which allows to represent my posts in a table with some sorting. It has some language files and I can change the language statically. However, what I want to do is to change it dynamically, when I switch the language with polylang.

Read More

I found the partial solution here. It allows to change the language of the table by pressing the special dedicated button. I was wondering maybe it’s possible to hook that button click function to the button of the language switcher?

I use the function

 pll_the_languages(array('show_flags'=>1,'show_names'=>0));

in my code to show the language switcher.

Thanks for any effort.

Any help would highly appreciated

Related posts

Leave a Reply