Internationalization and the plugin description

SO I am trying to do some i18n on a plugin I am working on and having some troubles. I wanted to see if anyone else has encountered these or possibly has a solution.

Basically, I have received the plugin translation and it all looks great except for one thing: the plugin description. I tried adding into the plugin header Text Domain and Domain Path, but I cannot figure out how to get this into the .pot file for translation.

I examined a couple of plugins ( WooCommerce and Easy Digital Downloads) and I noticed that both have the string in their .pot files and it doesn’t seem like they are doing anything special to get them there. I was trying this with Poedit and could not figure it out. The one thing I have not tried and maybe this will solve it is using the make .pot from WordPress, will that add in the description?

On another note with the Text Domain in the header (even for WooCommerce) I noticed that the plugin description does NOT get translated unless the plugin is actually active. Is that an issue with WordPress or is it just being done wrong?

Sorry for the long post and thank you to anyone who can contribute!o

2 Answers
2

You need to be using WP’s own tools (makepot.php) for creating POT files for header to be properly scanned and included, see Generating a POT file in Codex.

For plugin details to be translated when inactive its header should include properly set up text domain and path to translations folder (if necessary).

Leave a Comment