0

I have been developed a new plugin and published on wordpress.org. 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.org/plugins/wp-post-comment-rating/

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

  • What language options do you want to see? – Krzysiek Dróżdż Feb 18 '19 at 12:51
  • There is an language option showing after " Tested up to:" when visited on plugin page (wordpress.org). Like "Languages see all 2" etc. – Shoaib Saleem Feb 18 '19 at 12:59
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:

enter image description here

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.org platform. More on this here:

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

  • My plugin slug and text domain are not same. I think, that's is the issue. – Shoaib Saleem Feb 19 '19 at 5:00
  • @ShoaibSaleem yes - that will be an issue, since the slug has to be equal to the textdomain for plugins/themes in official repo. – Krzysiek Dróżdż Feb 19 '19 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.