In this tutorial, you will learn how to use generative AI and WPML to translate WordPress posts. We will show you how to create the WPML translation posts and how to easily translate post titles, post content, post excerpts, and even custom fields using artificial intelligence, all this from an intuitive spreadsheet.
WPML is a tool that helps you create multilingual WordPress sites. Your visitors just have to switch languages on your site, and they will see your WordPress content in their selected language.
Of course, serving a multilingual site needs a lot of translation work. This requires a lot of time and effort, and sometimes even a lot of people capable of translating your website into multiple languages. It’s a complex endeavor!
Here’s where WP Sheet Editor – AI comes in as the perfect AI translation solution for WPML. With WP Sheet Editor – AI, you can integrate the use of artificial intelligence in all WP Sheet Editor spreadsheets.
This gives you endless possibilities as you can generate WordPress content from scratch, edit existing content, and translate content with AI. You can use AI in all WordPress post types and fields supported by WP Sheet Editor!
Tools you need to bulk translate WordPress posts with AI
We assume you already have installed and activated the necessary WPML components to create a multilingual WordPress site.
Here’s what you need to integrate artificial intelligence into WP Sheet Editor spreadsheets and translate your WordPress posts with AI:
1- WP Sheet Editor – Post Types
This plugin allows you to view and manage posts, pages, and custom post types in a spreadsheet on your WordPress dashboard. It has advanced search, bulk edit, export, and import tools.
You can download the plugin here:
Download Posts, Pages, and Custom Post Types Spreadsheet Plugin - or - Check the features
2- WP Sheet Editor – AI
WP Sheet Editor – AI is a WordPress AI assistant tool that allows you to connect with your favorite AI providers and integrate the use of generative AI to every WP Sheet Editor spreadsheet. You can easily create and edit WordPress content in bulk with just a few clicks.
You can sign up here:
Sign up to the WP Sheet Editor - AI Service - or - Check the features
3- External API provider
The AI functionality in WP Sheet Editor relies on an external API like OpenAI, OpenRouter, etc. You’ll need an account with the provider and an API key to connect.
WP Sheet Editor – AI is compatible with these AI providers:
- Open AI for text and images (more info here)
- OpenRouter (more info here)
- Any other provider that uses the same format as OpenAI.
Follow this guide to learn how to set up AI providers in WP Sheet Editor – AI.
Optional – Create global AI prompts
With WP Sheet Editor – AI, you can save your prompts for easy reuse. This way, you won’t have to type prompts every time you want to use them to translate WordPress content.
If you want to know more about global prompts, you can read this guide.
But generally speaking, if you want to create global prompts, go to WP Sheet Editor > AI > Settings > Prompts.
Once there, click on Add new to create a new prompt.
Next, add the prompt name and the prompt text.
Here are some prompts you can save to translate your WordPress posts into different languages:
Translate WordPress post titles:
Translate the $current_value$ into Spanish. Return only the translation, preserving the original case sensitivity.
Translate WordPress post content:
Translate the $current_value$ into Spanish, preserving HTML structure and formatting. Return only the translated content with all HTML tags intact and case sensitivity maintained.
Important: Make sure you customize these prompts to fit your needs. For example, change the translation language and add specific information.
Once you’ve added the prompt, click on Save.
After saving your prompts, each prompt will automatically generate a prompt slug, which will be useful to use the prompt using a shortcut in the WP Sheet Editor spreadsheet.
Open the WordPress posts spreadsheet
With WP Sheet Editor – Post Types, you can bulk manage your WordPress posts, pages, and custom post types using a spreadsheet.
In this example, we will edit the WordPress posts, so we need to go to WP Sheet Editor > Edit posts.
As you will notice, the spreadsheet displays posts based on the WPML language selected in the admin bar. For example, here we have our posts in English.
However, if we select Spanish, you will see that we still don’t have Spanish translations, so we are going to show you how to easily create them and then use artificial intelligence to translate our posts.
Create the WPML post translations
To create translations into other languages, you need to open the spreadsheet in the main language. English, in this case.
Then, you need to add the language key or code to the WPML – Duplicate column in the spreadsheet.
To do this, you have two options.
First, you can go to the column and select the languages for which you want to create translations.
WP Sheet Editor allows you to select WPML languages as tags in the spreadsheet cells.
Once you’re done selecting the languages, click on Save.
Second, you can use the Bulk Edit tool.
This is great to bulk create the WPML translations of your WordPress posts.
Start by opening the Bulk Edit tool.
Now you need to select these values:
- Select the rows that you want to update: Edit all the rows from my current search
- What field do you want to edit: WPML – Duplicate
- Select type of edit: Set value
- Replace existing value with this value: In this case, we will enter “es” to create Spanish translations. If you want to create translations into multiple languages, you need to enter the language codes separated with commas. (Read more about language keys/codes here).
- Click on Execute Now.
After executing the bulk edit, you can switch the WPML language in the admin bar, and now we have posts in Spanish, although the post titles, content and other data have not been translated yet. Now we’re ready to start translating WordPress posts using generative AI.
Translate WPML posts with AI
WP Sheet Editor – AI is the perfect bulk AI translation tool for WPML and any other WordPress multilingual environment.
In the examples below, we will show you how to translate post titles and post content. But you can follow the same steps to translate other fields such as post excerpt, SEO metadata, and any other field, including custom fields added by plugins such as Advanced Custom Fields, PODs, etc.
Here are some options to translate posts with AI.
Option 1 – Translate using global prompts in spreadsheet cells
To translate titles, content, excerpts, SEO metadata and other fields of your WordPress posts using global AI prompts, just type ai: followed by the slug prompt.
For example, if you saved a prompt to translate titles whose prompt slug is translate-title, you need to enter this in the cells:
ai:translate-title
Remember that this is just one example. You can have global prompts saved for each case. You can have prompts to translate content into specific languages, specific fields, etc. It all depends on your creativity and your needs to create and run global prompts easily.
When you hit Enter, the AI will start processing the request.
And in a few seconds, the translation of the content of the selected cell will be completed.
You want to translate multiple cells at the same time, paste the shortcut prompt into multiple cells and watch the magic.
Once you have finished translating posts with AI, save your changes.
Option 2 – Translate using full AI prompts in spreadsheet cells
If you want to use full prompts in spreadsheet cells, you can easily do so. Just enter ai: followed by the full prompt in the cells you want to translate.
In this example, we will use this prompt to translate WordPress post titles into Spanish:
ai: Translate into Spanish. Return only the translation, preserving the original case sensitivity.
As you can see, we have translated the selected cell, and you can paste the same prompt in multiple cells in order to bulk translate cells. And once you’re done, make sure to Save the changes.
Option 3 – Bulk translate WordPress posts using global prompts
As explained above, you can save global prompts that you can reuse both in spreadsheet cells and in the Bulk Edit tool.
In this example, we will show you how to translate post content into Spanish, so we will start by opening the Bulk Edit tool.
Now you need to select these values:
- Select the rows that you want to update: Edit all the rows from my current search (including non-visible rows)
- Optionally, you can edit all the manually selected rows or open the search tool and edit all the search results.
- What field do you want to edit: Content
- This is just an example of how to translate the post conten, but you can translate data in any column of the spreadsheet:
- Title
- Content
- Excerpt
- SEO Title
- SEO Description
- SEO Keyword
- Social media SEO
- Or any custom field added with third party plugins
- This is just an example of how to translate the post conten, but you can translate data in any column of the spreadsheet:
- Select type of edit: Here you need to select the pre-saved AI prompt. In this case, since our global prompt for translating post titles is “Translate content”, the tool displays that option as “AI command: Translate content”. It will list all the pre-saved global prompts.
- AI Provider: If you have set up multiple AI providers and models, you can select the one you want to use in order to complete this task.
- You can click on the Show preview button to preview the result before applying this bulk edit.
- Once you’re sure and have selected the values, click on Execute Now.
If you want to know how WP Sheet Editor – AI handles the bulk AI requests, you can read more about our Bulk AI API here.
Option 4 – Bulk translate posts using full prompts
If you don’t want to translate your posts using global prompts, but full custom prompts, you can do so.
Just open the Bulk Edit tool.
Now you need to select these values:
- Select the rows that you want to update: Edit all the rows from my current search (including non-visible rows)
- Optionally, you can edit all the manually selected rows or open the search tool and edit all the search results.
- What field do you want to edit: Content
- This is just an example of how to translate the post conten, but you can translate data in any column of the spreadsheet:
- Title
- Content
- Excerpt
- SEO Title
- SEO Description
- SEO Keyword
- Social media SEO
- Or any custom field added with third party plugins
- This is just an example of how to translate the post conten, but you can translate data in any column of the spreadsheet:
- Select type of edit: AI Prompt
- AI Provider: If you have set up multiple AI providers and models, you can select the one you want to use in order to complete this task.
- Prompt: Enter the prompt here. In this example, we will use this prompt that you can customize and use:
Translate the $current_value$ into Spanish, preserving HTML structure and formatting. Return only the translated content with all HTML tags intact and case sensitivity maintained.
- You can click on the Show preview button to preview the result before applying this bulk edit.
- Once you’re sure and have selected the values, click on Execute Now.
If you want to know how WP Sheet Editor – AI handles the bulk AI requests, you can read more about our Bulk AI API here.
This is how you can use the power of generative AI to translate your WordPress posts into multiple languages. Your WPML translation tasks will stop being time-consuming and tedious. Now you can bulk translate your WordPress posts, pages and custom post types using artificial intelligence directly in WP Sheet Editor spreadsheets.