Polylang – Bulk Translate Post Categories in Google Sheets

Polylang is a plugin that allows you to create a Multilingual WordPress site.

You can create translations of pages, posts, taxonomies, etc. into several languages on your website.

That’s great, but translating the content of your WordPress site individually can take many hours of work.

For example, translating 100 posts could take you days, but we have written a tutorial on how to translate posts in bulk using Google Sheets.

However, in addition to translating your posts, you will need to translate the taxonomy terms of your site.

Therefore, in this tutorial, we will show you how to translate WordPress categories in bulk using Google Sheets.

What you need to translate WordPress categories

Note – This tutorial assumes you’re using Polylang for managing your multilingual WordPress site, so besides the Polylang plugin, you’ll need these three plugins/extensions/services:

WP Sheet Editor – Taxonomy Terms

This plugin allows you to edit taxonomy terms using spreadsheets within WordPress.

This means that the process we are going to show you in this tutorial can work for categories, tags, product attributes, custom taxonomy terms, etc.

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 categories using Polylang and 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 your WordPress post categories to Google Sheets

After connecting our WordPress site to Google Sheets, we need to export our post categories to Google Sheets.

When you go to WP Sheet Editor > Edit Categories, you’ll see all your WordPress post categories displayed in the spreadsheet.

polylang bulk translate categories in Google Sheets

The content of the spreadsheet will depend on the Polylang language you select in the wp-admin bar.

For example, if you select English, only the English categories will be displayed in the spreadsheet.

polylang bulk translate categories in Google Sheets

But if you select another language, Spanish for example, only the Spanish post categories will be displayed in the spreadsheet.

As you can see below, we have no categories but the default “uncategorized” category, so we need to translate our English categories into Spanish using Google Sheet’s =GOOGLETRANSLATE function.

polylang bulk translate categories in Google Sheets

To do this, let’s start by exporting our English categories to Google Sheets.

Open the Export tool.

polylang bulk translate categories in Google Sheets

Now select these values in order to export your post categories to Google Sheets:

  • What columns do you want to export: In this example, we will export these columns: Name, Description, Polylang: Language, Polylang: Translation of.
  • Which rows do you want to export: All the rows from my current search
  • What app will you use to edit this file: Google Sheets
  • Name of this export (optional): Add a name here, and that will be the name assigned to your Google Sheet.
  • Click on Start new export.

polylang bulk translate categories in Google Sheets

Once the process is completed, you’ll need to click on the View Google Sheet link to open the Google Sheet that was generated with this export.

polylang bulk translate categories in Google Sheets

As you can see below, we have exported our WordPress post categories to Google Sheets, and we’ll proceed to translate the category names and descriptions in bulk.

polylang bulk translate categories in Google Sheets

Step 3. Translate categories in bulk in Google Sheets

Note – Before translating, make sure you remove the record_id column from the Google Sheet because you won’t need it to import the translations once they’re translated. This is important because, if you do it after translating, it can affect the columns order.

Follow these steps to quickly translate your categories in Google Sheets:

1- Add extra columns for the fields to be translated.

For example, we are going to translate the Name field and the Description field, so we are going to add two additional columns: Name ES, Description ES.

polylang-bulk-translate-categories-google-sheets

2- Copy the contents of the Name column to the Polylang: Translation of column.

This will allow us to connect the translations to the original categories.

polylang-bulk-translate-categories-google-sheets

3- Change the content from the Polylang: Language column.

Instead of the source language, we will add the target language.

polylang-bulk-translate-categories-google-sheets

4- Translate the category names.

To translate the category names, we will add the following Google function to the cells where we want to create the translations:

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

For example, let’s say the name column of the post is D in the Google spreadsheet, 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 “Name ES” column:

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

It should look like this:

polylang bulk translate categories in Google Sheets

As you see, the text has been taken from the Name column (source language), and translated in the Name ES column (target language).

polylang bulk translate categories in Google Sheets

5- Translate the category descriptions.

You need to do the same in the Description ES (target language) column.

In this case, since the Description (source language) column is E in the spreadsheet, we need to add this in the Description ES (target language):

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

polylang bulk translate categories in Google Sheets

You can autofill the cells below and the translations will be completed in seconds:

polylang bulk translate categories in Google Sheets

As you can see, we’re now ready to import the Polylang translations of our WordPress categories from Google Sheets.

Note – Make sure you remove the record_id column from the Google Sheet because you won’t need it to import the translations. Take into account that this can affect the columns order; that’s why we recommended you to remove the column before translating.

polylang-bulk-translate-categories-google-sheets

Step 4. Import the category translations from Google Sheets

Now that we have translated hundreds or thousands of categories or any other taxonomy term in Google Sheets, we can import the Polylang translations into our WordPress site.

Start by opening the spreadsheet in the language you want to import (Spanish for example) and click the Import tool.

polylang-bulk-translate-categories-google-sheets

Now select the following values to import your Google Sheet containing the translated categories into WordPress:

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

polylang bulk translate categories in Google Sheets

Now we need to manually map the columns to import:

In this case, we need to ignore these columns:

  • Name (source language) = Ignore this column
  • Description (source language) = Ignore this column

And we will instead map these columns as follows:

  • Name ES (target language) = Name
  • Description ES (target language) = Description

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

polylang-bulk-translate-categories-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-categories-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 categories in Google Sheets

Translating WordPress categories, tags, and any other taxonomy term in Google Sheet allows you to effortlessly generate hundreds or even thousands of Polylang translations with ease.

The beauty of this approach lies in its elimination of the need to manually download and upload CSV files. With the direct connection, export, and import capabilities between WordPress and Google Sheets (thanks to the WP Sheet Editor plugin and the Google Sheets Sync service), the translation workflow becomes both efficient and convenient.

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