Puddinq.com sharing knowledge

Translating strings in WordPress Javascript files

Translating strings in WordPress Javascript files

To translate strings in wordpress javascript files you need 3 things: Your javascript file with translatable string A json file with the translations a php file that loads the javascript an connects the translation The javascript The javascript could look like this To translate the javascript Load it in php

HTML to image

je hebt nodig html2canvas en canvas2image

Remove jQuery migrate from WordPress

When WordPress is loaded it displays a jQuery migrate notice in the console. This means a part of software was loaded to be backward compatible. You can remove it:

jQuery make divs equal height

This little script can be run agains classes so all all items with that class are of equal hight. Sometimes it is impossible to make different items the same hight with css as the elements are flexibel and the size depends on the contents. The script looks at the heights of all items after loading […]