Building A Multilingual WordPress Site Without Touching Code

Building A Multilingual WordPress Site Without Touching Code

In the past, building a multi-language website in WordPress was a relatively complex task. Today, it can be easily done with plugins that help you manage multiple languages in your site.

In this guide, we will explain how to do it by simply using the Polylang Plugin. You don’t have to play with any code nor have any experience in it. Follow the steps below and you will find it easier than you think.

We’ll only note that there are developers who claim that there is no point in using language plugins for multilingual sites, but instead you should install a WordPress MultiSite (MU), and create more than one site, all with different languages.

But it depends on the kind of site involved.

If you are running a site with lots of content, then the MultiSite method is more recommended. However, in many cases where there are only a few pages on the web-site, it’s much easier to do it from one single interface. It would be a shame to install another system, especially when Polylang can transfer the contents to another site with relative ease.

The Polylang Plugin has a few advantages that other language plugins don’t have:

  1. Open source and completely free
  2. Well maintained and receives updates with each new version of WordPress
  3. A simple plugin, easy and comfortable and isn’t heavy like the other plugins
  4. The most important advantage: It doesn’t ruin the site after you remove it. So even if in the future you want to remove it, all the posts, categories and pages you have opened in another language – will remain. You will always be able to create a MultiSite and transfer any language to another site.

The following guide explains the WordPress installation adjustment to other languages, and how you can also add different languages in the WordPress installations.

Let’s Get Started

First of all, you need to install the Polylang plugin – by which we can open languages in the system and manage all the settings and change the interface language of the control panel.

Polylang Plugin

Adding Languages to the Site

After installing and activating the Polylang plugin, go to the plugin page in Settings > Languages, where you’ll find the page where you can add a language. In our example below, we will add French to our website. Choose the language from the drop-down list and click the “Add New Language” button.

Add language to wordpress

Strings Translation: Where Every Element Gets Translated

The Strings Translation Page – where you can find all the widget titles, site title, tagline, date and time format so you could adjust them to the language. Generally, the widgets don’t have to be translated, because you can decide for every widget in what language it is displayed (there’s more on that later in the guide). The plugin takes the rest of the translation from the theme or plugin language files. So if you notice strings that aren’t translated on the site – it means that there probably aren’t any translating files for the language you picked in your theme or plugin.

Polylang Strings

Language Settings

In the Settings page, you can control most website translation aspects and their management. Please note that immediately after the initial installation you will receive a comment in red. Don’t be alarmed. All you have to do is select the site’s default language and mark the checkbox: “There are posts, pages, categories or tags without language set. Do you want to set them all to default language?”.

Polylang Settings

That way, all of your pages and current posts will automatically be set to the default language, and from here on you’ll only have to set the language for each post or new page.

URL modifications: Setting The URL Structure For Each Language

You can display the different languages in different URLs, as written below:

  • The language is set from content – The URL of the posts, pages, categories and tags does not change
  • The language is set from the directory name in pretty permalinks – For example: http://yoursite.com/fr/my-post
  • The language is set from the subdomain name in pretty permalinks – For example: http://fr.yoursite.com/my-post
  • The language is set from different domains

Since every subdomain and domain is dependent on your host server and also requires installation knowledge, we would recommend that you choose the second option. This way the whole link structure will be shown by the language you’ve chosen. In any case, these settings will work only if the link structure is not on default.

Next mark the “Hide URL language information for default language”, and choose “Remove /language/ in pretty permalinks” and the result will be shown in the following structure: http://yoursite.com/fr/my-post

In addition, choose “The front page URL contains the language code instead of the page name or page id”.

Detect browser language: You can select “When the front page is visited, set the language according to the browser preference” – so users with a French browser will be brought directly to the French site and not in English. I personally do not prefer this feature because many French- speakers or other languages use browsers  in English (especially in Mobile).

Media: Activate languages and translations for media – this way a media modal will be displayed only with images that are associated with the language in which you write the post. It’s less useful because the images are usually the same in all languages.

Custom Post Type / Custom Taxonomies: If your site has Custom Post Type or Taxonomies that came from the theme or any plugin, you can choose whether to run the translation in these areas.

Sync Polylang

Synchronization: The Sync option allows you to keep the same values or translations in the case of taxonomies and page parent between the versions of the post or page. For example, if you publish a post on 1.1.15 at 2:00 pm – and now you want to publish the French version of the post, by choosing the synchronization of the information, the post in French will get the same publishing time. This way you can control the synchronization of the following:

Taxonomies, custom fields, comments status, ping status, sticky posts, published date, post format, page parent, page template, page order, featured image.

Note: If you are using a Pojo theme, don’t sync the custom fields because the Builder will duplicate itself.

Finished with the Settings area – now on to the site’s content, to display all the options that can be done.

Translating Posts, Pages or CPT

Now you’ll be able to see on pages or posts all your items arranged by the language they were written in. This way in every new page you open you’ll find a meta-box where you can choose your preferred language / open a similar post in another language / see the other versions of the same page.

Post or CPT in Polylang

Translating Menus

In the menu area, you can automatically add to every menu its ‘Language Switcher’ and select the menu according to the language the user is using. In this screenshot we use the Pojo theme, in which you can also select a custom menu for the mobile version, so note that you can also change the Mobile menu according to the user’s language.

Switch Langauges in Polylang

Translating Widgets

You can choose to have any widget displayed in all languages or only in a specific one. This way you can fully customize the site to any language.

Widget by Language

Users Languages

In your personal profile area, you can choose which language to use in the dashboard, so you can fully control your WordPress installation. Particularly useful for sites with a few users who update the site. It is also possible to insert biographical information in two languages, which is particularly suitable for bloggers.

Users

Taxonomies Translations

As in the posts and pages, you can define categories, tags or other taxonomy in different languages. Note that for each category in French, a parallel English one can be selected, this way every post which you copy into the English version will automatically select the category in English.

Ctagories

Now you have a website that is optimized for French and English. You can add as many languages you want, and you can do much more, like change the logo or add a different design or content for every language. You can read an orderly documentation on the plugin’s website.

If you are using the WPML premium plugin, then you can also import the content from it by using a destined plugin. In addition, you will find a lot of plugins that support this one.

The Pojo themes support this plugin perfectly. Using them, you can easily set up a multilingual website. In addition, once you duplicate a page created with the Builder, all the widgets will be duplicated and you will only have to change the content language. Saves a lot of time, and a great amount of money.

In our documentation area, you can find a guide on how to change the theme’s logo by every language while using Polylang.

You’re welcome to ask questions or add insights.

Good Luck!

2 Responses

  1. Valeria Castiello Reply

    Hello! Thank you for your useful guides!
    What if I want to translate my website on my own, and I have got already eng articles mixed with italian ones? (I have got “english version” category from my previous free website…)
    WPML or Polylang for my -wannabe- bilingual travel and photo blog?

    Thank you indeed!
    Valeria

Leave a Reply