$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'); ?>Plugin translation not working on WordPress.org|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)

Plugin translation not working on WordPress.org

matteradmin7PV0评论

I have been developed a new plugin and published on wordpress. I want to translate my plugin in French language. I created a .pot file and translate strings using poedit. After translation, I published my .po and .mo files on wordpress org using svn.

But I can't see any languages options when visit on wordpress.Here is the plugin link.

/

What is the proper way to make your plugin internationalize? Need Help

I have been developed a new plugin and published on wordpress. I want to translate my plugin in French language. I created a .pot file and translate strings using poedit. After translation, I published my .po and .mo files on wordpress org using svn.

But I can't see any languages options when visit on wordpress.Here is the plugin link.

https://wordpress/plugins/wp-post-comment-rating/

What is the proper way to make your plugin internationalize? Need Help

Share Improve this question asked Feb 18, 2019 at 12:39 Shoaib SaleemShoaib Saleem 1138 bronze badges 2
  • What language options do you want to see? – Krzysiek Dróżdż Commented Feb 18, 2019 at 12:51
  • There is an language option showing after " Tested up to:" when visited on plugin page (wordpress). Like "Languages see all 2" etc. – Shoaib Saleem Commented Feb 18, 2019 at 12:59
Add a comment  | 

1 Answer 1

Reset to default 1

Internationalization of a plugin doesn't mean that you can change its language by setting some option.

It means, that translation for this plugin is provided within the package, so after changing the language of WP, the plugin will use the same language as WP does.

If you want to change the language of WP, you can go to Settings -> General and there is a "Site Language" select:

After switching it to French, you can check, if your plugin is correctly translated - your translations should be visible from now on.

And if they're not, then you have to check, if you've translated that plugin correctly. To do so, you'll have to:

  1. Define textdomain in your plugin.
  2. Use that textdomain and translation functions for all your strings in the code.
  3. Provide correct translation files (.po/.mo).
  4. Make sure the paths to these files are correct.

And it's also worth to remember, that for plugins hosted in official Plugin Repository, you can use translate.wordpress platform. More on this here:

https://make.wordpress/plugins/2015/09/01/plugin-translations-on-wordpress-org/

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far