Polylang – Bulk Translate WordPress Posts with Google Sheets

Do you have a Multilanguage WordPress site with Polylang and want to discover the easiest and fastest way to translate posts, pages and other post types? You’re in the right place. We will show you how to bulk translate WordPress posts using Google Sheets and Polylang.

We will do this in 4 simple steps:

Step 1. Connect our WordPress site to our Google Sheets account

Step 2. Export our WordPress posts to Google Sheets

Step 3. Apply a simple function in Google Sheets to translate our WordPress posts automatically

Step 4. Import Polylang translations directly from Google Sheets to our WordPress website

But before, let’s see what you need to bulk translate WordPress posts with Google Sheets and Polylang.

What you need to bulk translate WordPress posts in Google Sheets

Note – This tutorial assumes you’re using Polylang for managing your multilingual WordPress site.

Besides the Polylang plugin, you’ll need these three plugins/extensions/services:

WP Sheet Editor plugin:

This bulk editor plugin allows you to increase your productivity by viewing and managing posts, pages, products and custom post types in a spreadsheet within WordPress.

WP Sheet Editor – Polylang extension:

This extension adds compatibility between Polylang and WP Sheet Editor. It allows you to view and edit Polylang fields as columns in the spreadsheet.


Google Sheets Sync service:

The Google Sheets Sync service allows you to export and import WordPress content using Google Sheets.

You can export and import immediately, as well as create scheduled exports and imports (one-time, in real time, recurring).

You can sign up to the service here:

Sign up to the Google Sheets Sync Service - or - Check the features

After installing the necessary tools, we can now proceed with the steps of this tutorial to bulk translate WordPress posts in Google Sheets.

Step 1. Connect WordPress and Google Sheets

When you sign up to the Google Sheets Sync service, you’ll get a helper plugin that will allow you to connect your WordPress site to your Google Sheets account, to the Google API, and to the WP Sheet Editor API.

Follow this guide to do it.

Step 2. Export our WordPress posts to Google Sheets

The spreadsheet will show you the posts depending on the Polylang language you select in the admin bar.

For example, as you can see below, we have selected the English language in the admin bar, so the spreadsheet shows the English posts only.

polylang bulk translate posts in google sheets

But if we select Spanish in the admin bar, we’ll see that the spreadsheet doesn’t display any posts because we haven’t translated our posts into Spanish, so that’s what we’ll do in this tutorial.

polylang-bulk-translate-wordpress-posts-google-sheets

To do this, we need to select English again in the admin bar and open the “Export” tool.

polylang-bulk-translate-wordpress-posts-google-sheets

Now we have to select these values in order to export our English posts to Google Sheets:

  • What columns do you want to export: We will select specific columns for this example:
    • Title
    • Content
    • Status
    • Author
    • Excerpt
    • Comments
    • Featured Image
    • Categories
    • Polylang: Translation of
    • Polylang: Language
  • Which rows do you want to export: We will export all the rows (all the posts)
  • What app will you use to edit this file: Google Sheets
  • Name of this export (optional): We’ll call it “My posts – English to Spanish“.
  • Click on Start new export.

polylang-bulk-translate-wordpress-posts-google-sheets

Once the export process is complete, you need to click the “View Google Sheet” link to open the file.

polylang-bulk-translate-wordpress-posts-google-sheets

As you can see below, we have exported our WordPress posts to Google Sheets directly.

polylang bulk translate posts in google sheets

Now we can start easily translating our WordPress posts in Google Sheets using a simple function.

Step 3. Translate WordPress posts in Google Sheets

There are several important things we need to do to create translations easily in Google Sheets.

1- Sort the columns to make the work more orderly.

Of all the columns we have exported, the only ones we are going to translate are Title, Content, and Excerpt, so we will move to the left the columns we are not going to translate (record_id, Status, Author, Comments, Featured Image, Categories).

Important:

  • We don’t have to translate the values from the Categories, Tags or other custom taxonomy columns because the posts won’t be linked correctly to their taxonomies.
  • Instead, you can translate the taxonomies manually or using the WP Sheet Editor – Taxonomy Terms plugin by following this tutorial.
  • Please note that, when we import the translations in this tutorial, “translations” of the categories will be imported by adding the suffix “-es” (or the target language code) to the URL Slug of each category. Then you can proceed to translate the name of each category.

As you can see below, we have added some colors to the column headings to make it look even more organized.

polylang bulk translate posts in google sheets

2- Copy the values from the “Title” column (source language) to the “Polylang: Translation of” colum.

This will allow you to connect the translation with the original post.

polylang bulk translate posts in google sheets

3- Add the translation language to the “Polylang: Language” column.

In this case, we will replace the source language with the target language.

polylang bulk translate posts in google sheets

4- Add the columns in which you want to translate the posts.

The columns we will translate from these posts are: Title, Content, Excerpt.

Therefore, we need to add three columns, and we can add a suffix to the column name to identify the translation language.

We’ll add these three columns:

  • Title SP
  • Content SP
  • Excerpt SP

polylang bulk translate posts in google sheets

5- Translate post titles, content and excerpt in Google Sheets.

Once you have sorted the columns and added the necessary columns, you can proceed to translate your WordPress posts.

To do this, you need to add the following function in the cells where you want the translations to be:

=GOOGLETRANSLATE(cell,"source language code","target language code")

For example, let’s say the title column of the post is G, and we want to translate the second row from English (source language) to Spanish (target language).

If this is the case, we should enter this in the second row of the “Title SP” column:

=GOOGLETRANSLATE(G2,"en","es")

polylang bulk translate posts in google sheets

When we check that the translation is done correctly, we can simply autocomplete / autofill the rows below.

polylang bulk translate posts in google sheets

We need to do the same in the other rows and columns where we want the translation of the titles, content and excerpts of our WordPress posts.

As you can see below, we have translated our post titles, contents, and excerpts.

polylang bulk translate posts in google sheets

Now we’re ready to start importing our Polylang translations from Google Sheets into WordPress.

Optional – You can remove the “record_id” column because the values in it are from the source language posts.

Step 4. Import Polylang Translations from Google Sheets into WordPress

Now we’re ready to start importing our Polylang translations from Google Sheets into WordPress.

To do this, we will open the spreadsheet in the translation language. In this case, we’ll select Spanish in the admin bar.

As you can see, we have no Spanish translations, so we will import all the translations we have created in Google Sheets.

polylang-bulk-translate-wordpress-posts-google-sheets

Let’s open the Import tool.

polylang-bulk-translate-wordpress-posts-google-sheets

Now we need to select these values to import the post translations from Google Sheets:

  • Source: Google Sheets
  • Google Sheet file: Select the Google spreadsheet where you translated the posts. You can refresh the list if you don’t find the Sheet.
  • Click on Next.

polylang bulk translate posts in google sheets

Now we need to manually map the columns to import:

In this case, we need to ignore these columns:

  • Title (source language) = Ignore this column
  • Content (source language) = Ignore this column
  • Excerpt (source language) = Ignore this column

And we will instead map these columns:

  • Title SP (target language) = Title
  • Content SP (target language) = Content
  • Excerpt SP (target language) = Excerpt

Once you’re done mapping the columns, click on Next.

polylang-bulk-translate-wordpress-posts-google-sheets

In the Do you want to update or create items step, we will select Import all rows as new and click on Next.

polylang-bulk-translate-wordpress-posts-google-sheets

Finally, we will see a preview. If everything is OK, we need to click on The preview is fine, start import.

polylang-bulk-translate-wordpress-posts-google-sheets

Once the process is complete, we will see how many posts have been updated and how many have been created.

In this case, we have created 30 items.

polylang-bulk-translate-wordpress-posts-google-sheets

As you can see below, we have imported our Polylang translations correctly.

polylang bulk translate posts in google sheets

We can check this in the Polylang: Translation of and Polylang: Language columns.

polylang bulk translate posts in google sheets

If we go to the Posts > All Posts page in wp-admin, we will see that the translations have been uploaded.

polylang bulk translate posts in google sheets

Here are the posts in the target language displayed in the Posts > All Posts page.

polylang bulk translate posts in google sheets

And if we open one translation, we will see that the titles, content and subtitles have been translated and imported.

polylang-bulk-translate-wordpress-posts-google-sheets

This process allows you to create hundreds or thousands of Polylang translations automatically. Just add a simple function in the cells, and you can translate hundreds or thousands of posts.

The best thing is that you don’t have to download and upload CSV files manually, because you can connect, export and import directly between WordPress and Google Sheets.

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.

Close