Guide

WPML String Translation

Merve Alsan
Written by
Merve Alsan
Merve Alsan
Written by
Merve Alsan
Elizabeth Pokorny
Reviewed
Elizabeth Pokorny
Elizabeth Pokorny
Reviewed by
Elizabeth Pokorny
WPML String Translation

Full disclosure: WPML is a great WordPress translation plugin. We’re writing a series of posts to help users get the most from some of WPML’s common features. Weglot is also a great tool for translating your WordPress site, but sometimes all you need is a little help to point you in the right direction with WPML, which is what this post will do for WPML’s string translation feature.

WPML was one of the first multi language plugins to offer a comprehensive way to manage WordPress translations and create a multilingual WordPress site, and they’ve paved the way for many other tools to get into the WordPress translation space, Weglot included.

However, while WPML is a great tool for translating your WordPress site, some people do run into issues with the WPML string translation feature, which might be why you’re here.

Sometimes you might just need a helping hand to point you in the right direction to get the most from WPML string translation, while other times you might prefer a tool with a different approach to managing translated content on your site. Either way, we’ll do our best to help you with this post.

What is WPML String Translation?

WPML string translation refers to translating any content that falls outside the WordPress editor.

When you use WPML, you can easily translate post content by essentially creating a “duplicate” version of each piece of content in a new language (or by using WPML’s new Advanced Translation Editor).

However, that interface doesn’t let you translate the parts of your site that sit outside the WordPress editor, like the text from your theme, certain content from other plugins, site taglines, etc.

That’s where WPML string translation comes in – it gives you a completely separate interface to manage just those pieces of content. Basically, it’s what lets you ensure you’re able to translate 100% of your WordPress site.

To generate these translation strings, WPML queries your theme and plugin files to understand what it needs to translate, so it’s important that those other extensions are compatible with WPML for the string translation to work perfectly.

How WPML String Translation Management Works

To use WPML string translation, you’ll need the Multilingual CMS package, rather than the cheaper Multilingual Blog package.

With that package and its component plugins installed, you can go to WPML → String Translation to open the editor. There, you’ll find a lengthy list of translations divided into different “domains”.

You’ll then need to go through and manually edit the translation for each string. You’ll also need to mark each translation as complete, as WPML will not display partial translations on the front-end of your site.

How to Fix Missing Strings in WPML String Translation

Sometimes, the WPML string translation tool might not be able to automatically detect all the strings in use on your site. There are a few different ways to try and fix that.

First, you might need to play around with telling WPML to register strings from the wp_options table or automatically register strings at display time. This can help WPML detect new strings that it wasn’t able to before.

Missing strings are also especially common with third-party plugins that you might be using, which may or may not have built-in WPML compatibility.

Sometimes WPML can’t pick up any strings from a plugin. Or, sometimes WPML will be able to pick up most strings from a plugin, but still end up missing a few key strings because of how the plugin is coded.

Another option to try and fix these missing strings in third-party extensions is to create your own wpml-config.xml file. This file needs to follow a specific format and will give you a chance to manually add missing strings to the WPML string translation interface.

Weglot Handles WordPress String Translation Differently

With Weglot, you don’t have to look for any special compatibility for string translation because Weglot automatically detects your content no matter where it’s coming from and is compatible with 99% of themes and plugins right out of the box.

In contrast, WPML works by duplicating your posts/pages and then searching for other content in the theme and plugin files (this latter content is what you use WPML string translation for).

Sometimes that can cause those missing strings, especially if a theme or plugin developer hasn’t added WPML compatibility to their extension.

Weglot’s approach is different – it automatically scans the finished HTML of each page on your site, detects the content, and then replaces it with translations.

By handling it this way, Weglot is able to ensure that it always picks up every single string that needs to be translated, without requiring any type of built-in compatibility from the theme or plugin developer.

How Weglot Works at a High Level

Beyond its different approach to detecting strings for translation, Weglot also helps you translate your site in a different way.

Rather than having you manually translate your entire site, or using automatic translation on a piece-by-piece basis, Weglot starts off by fully translating your site using automatic translation and adding a language switcher to the front-end.

Then, you can always go back and manually refine those translations and/or outsource them directly to professional translation services.

The upside is that you can be up and running with a working multilingual WordPress site in just a few minutes.

How Translation String Management Works with Weglot

Once Weglot has detected all the strings on your site and used automatic translation to translate them, Weglot gives you two different interfaces to manage those strings.

Both interfaces let you manage 100% of the translations on your site – they just go about it in a different way. That is, you can manage both your regular content and theme/plugin strings from both interfaces.

First, you can use the Translation list interface, which has some similarities to the WPML string translation interface.

You’ll see your original text on the left, along with the translated version on the right. Like WPML, you can also search for specific translations, mark translations as reviewed, outsource translations to professional editors, and view other information about each string:

Translations List

Alternatively, you can also use the Visual Editor. With this translation editor, you’ll see a live preview of your website, which some people find to be a more convenient way to manage string translations because it’s “point and click”.

Visual Editor

That will open a popup where you can manage that string’s translation:

Visual Editor with the pop up to manage translations

Weglot can also help you highlight each translatable element on the live preview of your site so that you know whether strings are separate or connected:

Visual Editor and SEO features

Here’s to Your Multilingual WordPress Site

WPML is a great tool for translating your WordPress site, but some people run into issues with the way that WPML string translation functions.

If you’re interested in a different approach to string translation on WordPress, Weglot works by scanning the outputted HTML of your content for its translations, rather than scanning the theme/plugin files themselves. This lets Weglot detect all the strings on your site without requiring any special compatibility from theme or plugin developers.

If you’d like to try out this alternative to WPML string translation, you can sign up for a 10-day free trial, with no credit card required (or, you can also use the free plan to translate up to 2,000 words).

The setup process is quick, and you’ll be up and running with a multilingual site in just a few minutes. Click here to get started with your free trial today.

In this guide, we're going to look into:

Explore more about working with Weglot

Try for free