Localize JS

Wordpress directory for this plugin

Wordpress has the function wp_localize_scripts for translation, but the strings passed to it have to be hard-coded. Until you parse the .js-files and scan for occurrences of _e() with a fast regexp, and localize them with the data using the Wordpress _e-function to localize from a .po file. *Note*. Your po-file has to include strings from javascript files. To do this in Poedit, see this article. Write me if you need help.