With a WordPress Multilingual Site, reaching an international audience that speaks multiple languages is easy. This can have a positive impact on your website traffic and revenue. The first step required is to add multilingual functionality.
“I Increased My Search Traffic by 47% from Translating My Blog into 82 Languages” – Neil Patel
It’s also worth mentioning that there has been an increase in WordPress Multilingual sites in the last period of time. Build With comes with an interesting graphic explaining the multilingual trends.
Businesses that should have a WordPress Multilingual site
Firstly, let’s make a short roundup of some international businesses that would need a multilingual site:
- Tourism agencies & Hotels
- Companies that are doing or extending their business on international markets
- Companies active in a country with more than one language, such as Canada (English, French)
Types of translation available
As my colleague Cristian explained, “WordPress in more languages can be anything between a slight annoyance to a real problem that can stop your project halfway”. There still isn’t a clear solution for multilingual sites, and the most common one is which multilingual plugin to use.
Besides, if we discuss the types of translation available on the market, and which can help you translate your WordPress site, these can be divided into three categories:
- Automatic translation
- Semi-automatic translation
- Human Translation
Furthermore, there is also the core functionality of WordPress, namely WordPress Multisite, that lets you create multiple websites on the same WordPress installation.
Inside a WordPress Multisite installation, you can create one website version for each language need to display on your site. It’s a good option for true multilingual sites using different content in different sites, however, you should keep in mind that it can be quite difficult to configure and manage for non-technical users.
Creating a WordPress Multilingual Site with TranslatePress
Going forward with WordPress Multilingual, we’ll use TranslatePress, which is an easy to use WordPress translation plugin, that has a friendly interface, and which combines two translation possibilities: transform your site into a multilingual one with human translation or use Google Translate API to automate the process. According to Build With, the number of websites using the Google Translation API has increased.
Also, if the plugin has translations available in the languages you want to translate your site, they will be automatically served.
As for our example, if WooCommerce has already translations available in French, the translation for the strings connected to WooCommerce will be automatically taken from the .po files.
Now let’s say you are a Canadian business owner that wants to translate his actual English site to French. I will guide you further on how create your WordPress Multilingual Site using TranslatePress, considering the following topics:
- Manual & Automatic Translation
- How to translate an entire page
- Translating dynamic strings (gettext)
- How to display a language switcher on your site
To make sure we’ll go through this tutorial without problems, there are a few steps you have to follow:
- Go to the Plugins Section, in your WordPress dashboard;
- Search for TranslatePress;
- Install and activate the plugin
After activating the plugin, you will find the Translate Site button on your Admin Bar. You can use it to access the translation interface.
Before starting to actually translate your website, you will need to configure a few settings for TranslatePress. The Settings panel can be found by going to your Dashboard -> Settings -> TranslatePress.
On this page, you can choose your Default Language, Translation Language and if you want Manual or Automatic Translation, among other things.
In our case the default language for the Canadian business site is English, and we’ll want to translate it to French. On the Settings page, we need to check that the Automatic Translation option that is making use of Google Translation API is set to No.
To start translating, click on the Translation Site button, found on the Settings page or the one from your Admin Bar. A new page will open with the front-end editor and you can start translating the entire page, by adding the translation string by string.
As an example, if you want to start with “My Account” page, you click on the name on the page and then hover over each string.
In the translation editor, you will also find a list with all the strings contained in the current page. Some of them are public and can be directly edited with hover over the name, and others are hidden. One of the hidden strings are the SEO ones, which can be translated with the PRO version of TranslatePress.
Furthermore, you just easily navigate from one page to another, just with a few clicks.
Automatic Translation with Google Translate API
In this case, you will use Automatic Translation for your website, with the help of Google Translate API to help you as a starting point with simple strings until you put in place the manual translation.
With the Google Cloud Translation API, you can easily translate the text between thousand of available languages. There are a few steps you need to follow in order to enable the API and easily integrate it with TranslatePress.
In order to activate the Automatic Translation feature, you need to go to your WordPress Dashboard -> Settings -> TranslatePress. There you will find a field named Google Translate API, where you will have to insert the API key.
In our case, we said that we want a bilingual site, for the Canadian business, so we only need to activate French.
We’re going to switch back to the Editor Interface on the front-end of your site, choose French from the language list, and the page will automatically load the translated version of your site. Now you have a nice preview of how it will look like.
Translating an entire page
After the live preview of your translated site, you can choose a particular page, click on it and the editor will load all the strings available, even the hidden ones, such as SEO meta tags and description.
In this case, I navigated to the WooCommerce Cart which is now named Chariot.
Translating dynamic strings (gettext)
The next step in translating your WordPress site is to Translate Dynamic Strings that are coming by default from WordPress, or from other plugins and themes.
Gettext strings are different from normal strings and can take various forms, such as:
- Dynamic variables (%1$s by %2$s) – there are strings that can contain things like username, plugin settings or other variables;
- Original strings – Can be strings added by plugins/themes. You will find these strings under the “Original string” box in the translation editor;
Using TranslatePress you will be able to translate the dynamic strings loaded on that page.
Display a Language Switcher
With TranslatePress you can also have the option to display a language switcher so that your users can easily switch from English to French.
To implement the language switcher, go back to the WordPress Dashboard -> Settings -> TranslatePress and there you have the following options:
- Using the shortcode [language-switcher] on any page or widget;
- As a WordPress Menu item, from the WordPress dashboard -> Appearance -> Menus to add Language Switcher Languages in any menu;
- As a Floating Language selection where you can display a floating drop-down menu that will follow the user on every page within your website;
That’s it! We went through configuring a multilingual site for a Canadian business with the help of TranslatePress.
There are some key advantages if you use this plugin to build your WordPress Multilingual Site:
- Allows you to translate the entire page by using an intuitive UI similar to the Customizer;
- Full integration with Google Translate API;
- Fast and friendly with both Manual and Automatic Translation;
Have you ever considered building a WordPress Multilingual Site? What solutions have you used? Were there any features they were lacking?
Let us know in the comments section below!
Subscribe to get early access
to new plugins, discounts and brief updates about what's new with Cozmoslabs!