Once you have AI translations from PTC, you can either import your translations to WordPress.org or bundle them with your plugin or theme. This page explains both workflows and helps you choose the best approach for your project.
On this page
Ways to Make AI Translations Available in WordPress
There are two ways to make your PTC translations available in WordPress.
Our team has used both methods in real WordPress plugins.
- For WPML Multilingual and Multicurrency for WooCommerce (WCML), we include translations with the plugin
- For WPML Multilingual for Easy Digital Downloads, we import translations to WordPress.org using a CLPTE account
We recommend including translation files inside your plugin or theme because it gives you a faster and easier release process.
Follow the steps and estimated times below to pick the option that suits your project best.
Option 1 — How to Import Translations to WordPress.org
To import and manage your own translations on WordPress.org, you’ll need a separate account with CLPTE (Cross-Locale Project Translation Editor) rights.
Step 1
Create a new CLPTE account on WordPress.org
If you already have an account, you may encounter issues such as your new account being disabled. This happens because WordPress does not allow multiple accounts.
To resolve this, contact forum-password-resets@wordpress.org and explain that you are trying to create a CLPTE account. It helps to share the relevant Polyglots documentation with the moderator and to ping the Polyglots team in Slack.
Estimated time: ~ 3–5 days
(includes waiting time if your new account is disabled)
Step 2
Make a CLPTE Request on the Polyglots Blog
With your account enabled, make a CLPTE request for your plugin or theme on the front page of the Polygots blog. You’ll get a notification when your request is approved.
See the CLPTE request made by our team.
Estimated time: ~ 1 day
Step 3
Import Your Translations into WordPress.org
To import translations created by PTC into WordPress.org:
- Log in to https://translate.wordpress.org/ using your CLPTE account.
- Go to your plugin or theme’s translation project page (for example, WPML Multilingual for Easy Digital Downloads).
- Open the local project for each language you have translated.
- Scroll down and click Import Translations.
- Upload your
.poor.mofiles. - Repeat the steps for every language.
Estimated time: ~ 10–30 minutes
Option 2 — How to Include Translations With Your WordPress Plugin or Theme
You can include translations directly in your plugin or theme so users receive them as part of your product. Just place the translation files in your /languages/ folder and add a small code snippet to make WordPress load them instead of community translations.
Step 1
Add Your Translation Files
Place your compiled .mo files inside your plugin or theme’s /languages/ directory.
This structure ensures WordPress can find them when loading your text domain.
Example:
my-plugin/
├─ my-plugin.php
├─ languages/
│ ├─ my-plugin-es_ES.mo
│ ├─ my-plugin-fr_FR.mo
Tip: Use the same text domain in your translation file names and your load_plugin_textdomain() or load_theme_textdomain() calls.
Estimated time: ~ A few minutes
Step 2
Ensure WordPress Loads Your Translation Files
By default, WordPress prioritizes community translations from WordPress.org over bundled ones.
To make sure your plugin or theme uses the bundled .mo files instead of community translations, add the load_textdomain_mofile filter.
Example usage for plugins
Add this snippet to your main plugin file (for example, my-plugin.php):
function my_plugin_load_embedded_translation_file( $mofile, $domain ) {
if ( 'my-domain' === $domain && false !== strpos( $mofile, WP_LANG_DIR . '/plugins/' ) ) {
$locale = apply_filters( 'plugin_locale', determine_locale(), $domain );
$local_mofile = WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) . '/languages/' . $domain . '-' . $locale . '.mo';
if ( file_exists( $local_mofile ) ) {
return $local_mofile;
}
}
return $mofile;
}
add_filter( 'load_textdomain_mofile', 'my_plugin_load_embedded_translation_file', 10, 2 );
Example usage for themes
Add this snippet to your theme’s functions.php file:
function my_theme_load_embedded_translation_file( $mofile, $domain ) {
if ( 'my-domain' === $domain && false !== strpos( $mofile, WP_LANG_DIR . '/themes/' ) ) {
$locale = apply_filters( 'theme_locale', determine_locale(), $domain );
$local_mofile = get_template_directory() . '/languages/' . $locale . '.mo';
if ( file_exists( $local_mofile ) ) {
return $local_mofile;
}
}
return $mofile;
}
add_filter( 'load_textdomain_mofile', 'my_theme_load_embedded_translation_file', 10, 2 );
Estimated time: ~ A few minutes
Step 3
Confirm That Your Translations Load Correctly
Confirm that WordPress is loading the translations you included in your plugin or theme instead of the community translations from translate.wordpress.org.
You can do this by installing your plugin or theme on a test site and switching WordPress to one of the languages you’ve provided.
- Go to Settings → General → Site Language and select a language that you’ve included in your
/languages/folder. - Load a page or screen that contains strings you know are translated in your
.mofile. - Check that the strings appear in the correct language and match the translations you added.
If you still see old community translations, review the code snippet in the previous step to make sure it correctly points WordPress to your bundled .mo files.
Alternatively, you can install a plugin like Query Monitor. Open any page and look under Languages to see which .mo file is loaded for your text domain.
Estimated time: ~ A few minutes