Question

Plugin name is a comment in WordPress. Since you can't write php code in the comments, is there a way to localize the plugin name and make it translatable?

Was it helpful?

Solution

Just add the full string of the plugin name into the plugin's text domain. WordPress looks this up automatically. Same with Description, PluginURI, Author and AuthorURI.

See the internal function _get_plugin_data_markup_translate.

The string extractor in Glotpress (and my own plugin Loco Translate) adds these header strings automatically to new POT files.

OTHER TIPS

Not easily. You could copy all the files and change the plugin name. But you still have to go through line by line. Why not just use google-translate plugin on the page the plugin is displaying? All languages are good then.

GTranslate works well for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top