2

WordPress.org launched recently a new translation mechanism via https://translate.wordpress.org/.

What steps should I make to translate a plugin at wp.org plugin repository correctly?

Can I remove the .po/.mo/.pot files from the plugins folder?

Are the .po/.mo translations already included into the plugin's translations on https://translate.wordpress.org/ website?

Is it possible to translate theme via this approach?

1 Answer 1

2

So to make plugin translatable via translate.wordpress.org you need to add text domain into main plugin's file:

/*
 * Plugin Name: My Plugin
 * Author: Plugin Author
 * Text Domain: my-plugin
 */

So to make theme translatable via translate.wordpress.org you need to add text domain into main theme's file:

/*
* Theme Name: My Theme
* Author: Theme Author
* Text Domain: my-theme
*/

And also all the strings should be wrapped with gettext _() functions with the same text domain.

All further details can be found in the official docs below:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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