Import and Export strings translations

Strings translations Import and Export module is integrated by default in Polylang Pro. The goal of this module is to export all your strings translations in a format (the PO or XLIFF format) that allows you to translate them (from the default language of your site, to a language you select). And finally to import these translated strings.

Export strings translations

So first, go in Languages > Translations.

There is a metabox at the bottom of the page that allows you to export your strings translations :

You can choose the language(s) in which you want to translate the strings. You will then have a translation file for each selected target language.

You can filter the strings translations to export only one group, or all of them (they are grouped by core feature, plugin, or widget). By default, the filter is on “Export all groups”.

Choose the your export file format, you can choose either the .po format or the XLIFF format.

Finally, hit the “Download” button to download your export file.

So you get a ZIP file that contains one translation file for each previously selected target language.

Now that you have your translation file(s), you can proceed to their translation through a professional translator, or use tools that allow you to translate this file format as Poedit.

Note: If you don’t want to do a translation, but only want to import your strings on another site, read Export strings translations from one site to another.

Import strings translations

Go in Languages > Translations.

There is a metabox at the bottom of the page that allows you to import your strings translations :

Choose the file you want to import (it has to be a PO file or a XLIFF file like the exported format).

Choose the status of the imported posts: Publish or Draft

Finally, hit the “Upload” button to launch the import process.

After hitting the “Upload” button, a success message is displayed and you obtain your strings translated as shown below. In the example below, I exported my WordPress strings (3 strings) for the French language > translate them in French thanks to Poedit such as the site title > then imported them successfully. The site title for the French language is now “Mon site the test !” .

Note: You can only translate one language at a time, because we have one translation file per target language, and we only import one file at a time.

Exporting your strings translations from one site to another

When you export your strings translations, a “Site-Reference” attribute is created in the translation file, as shown here :

PO file with site reference

If you want to import this file on another site than the one from which it has been exported, you will have to change the value of “Site-Reference”.

So you have to replace the current URL by the one you want to import your strings translations on.