Looking for the best solution for WordPress string translation?
Fully translating and localizing your WordPress site requires more than just translating the content from the WordPress editor. You’ll also have content from your theme, plugins, widgets, etc.—that’s where WordPress string translation comes in.
In this post, we’re going to show you how to translate any string on your WordPress site using TranslatePress and its simple visual editor.
But what about other strings that aren’t able to be translated automatically on the front end? What are they and how do you find them?
We’ll also show you what those strings are and how to translate them using TranslatePress’s new and improved String Translation interface.
No matter where it comes from, TranslatePress will automatically detect every string on the front-end of your site right out of the box (and even some on the back-end, like Yoast SEO settings). Then, you’ll be able to translate each string using one unified interface—no jumping back and forth between separate interfaces like some other plugins force you to do:
You can be translating your site in just a few minutes—for free!
What Are the Different Types of WordPress Strings?
If you want to fully translate a WordPress site, you’ll need to deal with content from a lot of different places.
The most obvious is content from the WordPress editor. But you’ll also need to translate other content such as:
- Gettext strings – these are static content from your theme or plugin. For example, the “Next Page” link in your theme that controls pagination or the “Add to Cart” button in WooCommerce.
- User-generated theme content – for example, the custom text that you added to your footer using your theme’s settings.
- User-generated plugin content – for example, a WooCommerce product description or a design that you created with a WordPress page builder.
What You Need for WordPress String Translation
To translate the strings on your site, you need a WordPress translation plugin.
Here, there are some differences.
Some plugins only let you translate certain types of strings.
Others require you to jump back and forth between different interfaces to translate strings. For example, you might be translating post content one second and then need to jump over to a separate interface to translate strings from your theme.
What’s more, some popular plugins require you to manually mark some strings for translation. For example, a translation plugin might be able to detect the static gettext strings from your theme, but you might need to manually mark user-generated theme content for translation.
TranslatePress is a free WordPress translation plugin with a unique approach to string translation.
Rather than using separate interfaces and/or requiring you to manually mark some strings for translation, TranslatePress…
- Lets you manage all of your translations from one simple visual interface that looks a lot like the WordPress Customizer;
- Automatically detects all strings right out-of-the-box—even user-generated theme or plugin content.
All you need to do is click on the string that you want to translate and you’ll be able to edit it:
Or, you’ll also be able to search for strings using a real-time search and edit them using the String Translator.
TranslatePress works out-of-the-box with:
- Content from your theme, including gettext and user-generated strings;
- Content from your plugins, including gettext and user-generated strings;
- Menu items;
- Content from the post editor (the block editor or the Classic TinyMCE editor);
- Back-end strings, like SEO titles/descriptions, social media share descriptions (e.g. Open Graph tags), and more (premium feature).
Basically, no matter where the strings come from, TranslatePress will let you translate them from this visual interface.
Beyond making it easy to translate 100% of your site, TranslatePress also:
- Hosts everything on your WordPress site’s server;
- Supports automatic machine translation via Google Translate (free) or DeepL (premium feature);
- Lets you translate your content into one new language (free) or unlimited new languages (premium feature).
How to Translate All Types of WordPress Strings
Now, let’s get into the step-by-step guide for how you can use TranslatePress for WordPress string translation.
1. Install TranslatePress and Choose Languages
To get started, install the free TranslatePress plugin from WordPress.org.
Then, go to Settings → TranslatePress to choose the language(s) into which you want to translate your site.
Again, the free version lets you translate your site into one new language, while the premium version lets you use unlimited languages.
TranslatePress also supports automatic string translation via Google Translate or Deepl. You can use these services to generate baseline translations for every single string on your site and then go back and make manual edits if needed.
Automatic translation is 100% optional—you can also just make all your translations manually. If you do want to use automatic translation, you can set it up from the Automatic Translation tab—check out our full guide on how to automatically translate WordPress.
2. Open the Visual Translation Editor
Once you’ve chosen your language(s), open the piece of content that you want to translate on the front-end of your site. Then, click the Translate Page button on the WordPress toolbar to open TranslatePress’s visual translation editor:
3. Translate Strings
To translate a string, all you need to do is hover over the text and click the pencil icon. That will open that string’s translation in the sidebar, where you can add your translation:
You can also use the drop-down in the sidebar to directly search for certain strings. In some cases, you might find it faster to search than click on the live preview. After searching for the string, you’ll be able to translate it in the same sidebar:
The general process is the same no matter what type of content you’re translating, but let’s go through some examples to drive the point home…
To help you quickly see which strings come from gettext, TranslatePress will automatically mark all gettext strings with a green pencil icon (as opposed to the normal blue icon).
If you’re not familiar with this term, gettext strings are strings that are hardcoded into your theme or plugin. The gettext filter lets you easily translate those strings. Learn more about gettext.
For example, let’s take the bit of text in your theme that lists “Categories”. The individual categories would not be gettext, but the text that proceeds those categories would be. You can see an example below, as marked by the green pencil icon:
When you translate gettext strings, you’ll be able to translate both the original version (in your site’s native language) and the translated version.
If your theme or plugin already includes translations for a certain gettext string, TranslatePress will pre-fill that translation, but you still have the option to edit it.
TranslatePress will also automatically apply these translations to every single instance where gettext appears. That is, you won’t need to manually translate gettext strings on every page.
Other Theme Strings
Most themes will have additional content beyond gettext. For example, the Hestia theme gives you options in the WordPress editor to customize the one-page homepage design.
TranslatePress works for these strings just like any other. The animated GIF that we showed you earlier is actually a good example of translating these user-generated theme strings.
Here’s a complete guide on how to translate a WordPress theme.
Other Plugin Strings
TranslatePress can help you translate any string from a plugin, whether or not it’s gettext. This includes forms, WooCommerce products, page builder content, etc.
Here’s an example of what it looks like to translate a WooCommerce product…
Some parts of the translation, such as the “Add to Cart” button, are gettext:
Others, such as the user-generated product title and description, have the regular blue icon:
Here are some tutorials for translating specific types of plugin content:
TranslatePress also works with WordPress page builder plugins:
Finally, you can also translate custom field content from plugins such as Advanced Custom Fields, Toolset, Pods, etc.
Menu items work just like any other type of string:
You can use the same approach for WordPress widgets. Some widget strings will come from gettext (green icon), while others are user-generated. Either way, you’ll be able to translate them from the visual interface:
You can also show different widgets based on a user’s chosen language.
Post Editor Content
We haven’t talked about it so far, but you can, of course, also use the same interface to translate any content that you’ve added in the WordPress editor (either the block editor or the Classic TinyMCE editor).
Here are some guides to help:
Finally, TranslatePress isn’t limited to translating strings! You can also use it to “translate” media content to better localize your site.
All you need to do is hover over the image and click the pencil icon. Then, you can select a different image file to use for each language and also translate the alt text:
You can use this same approach to translate all types of images and media content, including sliders.
We’ve shown you several ways to translate strings using the Visual Editor. Now, let’s cover using the new String Translation Interface to work on hidden and dynamic strings.
How to Use the String Translation Interface
First, you need to navigate to the correct menu. From any page on your site, click Translate Site in your Admin bar, or from Settings → TranslatePress. Since you won’t be using the visual editor for this, you’ll need to switch the tab in the lower left corner from Visual Editor to String Translation.
You’ll now see that there are three tabs at the top to help you find the exact string type you’re looking for: Slugs, Gettext, and Emails. There’s also a filter function for each to help narrow your search.
Let’s walk through each tab to learn how to translate the various string types.
The Slugs tab is where you’ll find all of the slugs present on your site, be it page slugs, post slugs, taxonomy, or anything else.
Even though you can translate slugs from the visual editor too, here is where you’ll find all of them in one place so you can save some time. You can even use filters to easily identify the slugs you’re looking for, or filter out the ones that have already been translated.
Under the Gettetx tab, you’ll find strings that come from plugins or themes that may not be visible on the front end of your site. These strings are usually dynamically displayed as a result of submitting a form, or another type of notification message.
For example, if a customer purchases a membership on an eLearning site, they’ll likely see a confirmation message that their payment was approved. However, the text that’s generated by the plugin may not have been translated because it was not visible on the front end.
As you open the Gettext tab, TranslatePress will automatically begin searching your site for content. Depending on the complexity of your site, several hundreds of pages of strings may be found. To make things easier, you can select filters at the top which will narrow your search. You can also enter a keyword in the Search Gettext Strings box to find something even more specific.
Once you find the string you’re looking for, you can translate or edit the translation in the left-side panel — just as you would any other manual translation.
The Emails tab shows you any strings that appear in emails generated by your site’s plugins. As I mentioned earlier, a WooCommerce customer notification is one example. WPForms is another plugin that generates emails.
Before you start searching, click the Rescan and theme for strings button. This will start a scan for any potential email strings found on your site. There are essentially two types of email notifications that are typically sent from your website:
- Emails sent to a user of your site. This could be a customer who purchase a product, a visitor who signs up for your newsletter, or someone who fills out a form. Confirmations and double-optin notices fall into this category.
- Emails that are sent to you, an admin on your site, or any manager of your WooCommerce store. These can be notifications such as gaining a new subscriber, a purchase was made, or an order was canceled.
For some plugins, such as WooCommerce, TranslatePress automatically translates email notifications. The language used is dependent upon the language the user enabled while browsing your website.
However, some messages and notifications may not have been translated automatically, and that’s where you’ll need to use the String Translator interface to search for them. This could be a confirmation message on a form, or a notification that a form submission failed.
For example, one common string found in WPForms is “Sent from %s.
To translate the string, click edit. The String Translation panel on the left will display the original text and the fields for translating into any languages you have enabled on your site. Enter the translated text in the appropriate language fields, and Click the Save Translation button at the top.
You can continue to search for any email strings that you need to translate and edit them using the String Translation interface.
Under the Emails tab, you’ll only find plugin localized strings. For example, if you’ve customized the default messages for WooCommerce, you’ll need to look under the Regular tab to find them.
If you don’t see a Regular tab displayed next to the others, don’t panic. This tab is hidden by default to prevent the interface from overloading. It can easily by enabled in the TranslatePress settings. Navigate to Settings→TranslatePress and look under the Advanced tab.
Under Debug, enable Show regular strings tab in String Translation. Now you can navigate back to the String Translation editor, where you’ll now find the Regular tab.
In this tab, you’ll find just about every string on your website, including the ones already translated in the visual editor. Like the other tabs, you can search for specific strings and edit their translations in the left panel.
Get Started With WordPress String Translation Today
If you want to fully translate your WordPress site, you need a way to easily translate strings from gettext, user-generated theme or plugin content, menus, widgets, etc.
Some plugins force you to use separate interfaces and/or manually register strings for translation, which adds complexity and effort.
With TranslatePress, you can eliminate both problems:
- TranslatePress will automatically detect all the strings on your site, no matter where they come from. No need to manually declare certain strings for translation.
- You can manage all of your strings from a single unified interface that includes the visual translation editor and the String Translation interface. No need to jump back and forth between different interfaces every time you want to translate something.
You can get started with the free version of TranslatePress at WordPress.org.
Then, consider upgrading to the Pro version to access powerful new features:
- Multilingual SEO – translate SEO metadata strings from plugins such as Yoast SEO or Rank Math for improved multilingual SEO;
- Unlimited languages – translate your site into unlimited new languages (the free version limits you to a single new language);
- DeepL automatic translation – add support for DeepL (the free version supports automatic translation via Google Translate);
- Navigation based on user language – show completely different navigation menus based on a user’s language (the free version lets you translate menu items, but you can’t create separate menus).
Do you still have questions on how WordPress string translation works with TranslatePress? Let us know in the comments below!
If you found this post helpful, please check out our YouTube channel, where we constantly upload short & easy-to-follow video tutorials. You can also follow us on Facebook and Twitter to be the first to know each time we post.