$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>localization - Localize plugin name|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

localization - Localize plugin name

matteradmin8PV0评论

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.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far