Plugin translation not working on WordPress.org

admin2025-06-03  2

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/

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

最新回复(0)