Currently i'm working on a simple WordPress Plugin.

I know within the Plugin i need to write my strings as __() or _e() and call load_plugin_textdomain() but i wonder how to localize the Plugin Description.

Example:
example

This is not the Plugin i'm working on. It's just an example to show what i mean.

  • Plugin description is in comment block and I think it can't be localized – Mamaduka Aug 11 '11 at 11:59
  • I know it's a comment block thats why i ask :) Plugin URI and Author URI are parsed as link. It should be possible to translate. Makes sense imho... – gearsdigital Aug 11 '11 at 12:05
up vote 2 down vote accepted

Add two extra headers:

Text Domain: your-text-domain
Domain Path: /languages

Then use the plugin Codestyling Localization to create your language files. Usually it'll find the description.

  • It's not exactly what i want if i understand you correctly. Localization is not the problem, i'm using Poedit. As i can read the Plugin only reads gettext components. But i'm not sure the Plugin-Description is a gettext component. – gearsdigital Aug 11 '11 at 13:12
  • 1
    It is what you want – if you use the Codestyling plugin instead of Poedit. You could hack around Poedit’s restriction by inserting a dummy string with the content of your description somewhere. – fuxia Aug 11 '11 at 13:47
  • Ok, but every user who installed my plugin needs to install the Codestyling Localization Plugin too, isn't it? – gearsdigital Aug 11 '11 at 14:04
  • No, this plugin is needed to create the language files only. – fuxia Aug 11 '11 at 14:09

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.