localization - Localize plugin name

admin2025-06-02  1

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?

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?

Share Improve this question edited Mar 6, 2019 at 15:24 cjbj 15k16 gold badges42 silver badges89 bronze badges asked Mar 6, 2019 at 14:39 AmiritionAmirition 3555 silver badges20 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 3

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.

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748831199a314084.html

最新回复(0)