Guide

How to make a WordPress site multilingual

To make a WordPress site multilingual you need four things: an address for every language, one language per page, hreflang tags that connect the translations, and a language switcher. WordPress does not support multilingual sites out of the box, so you add a multilingual plugin. This guide does the whole job with Vabelon, a free plugin, in three steps.

What a multilingual WordPress site needs

WordPress has a Site Language setting under Settings, then General. It changes the language of WordPress itself, not of what you write. Your pages stay in the language you wrote them in, and nothing connects an English page to its Spanish version. A multilingual site adds that missing layer:

  • An address for every language. Google recommends different addresses for each language version of a page, instead of one address that changes language by cookie or browser setting. Most sites use a folder per language, such as /es. See subdirectory or subdomain.
  • One language per page. Google works out the language from the visible text, so a page that mixes languages is hard to classify. Each translation is its own page.
  • hreflang tags, so that search engines know which pages are translations of each other. See hreflang tags.
  • A language switcher, so that visitors can move between the versions themselves.

Before you start

  • Decide which languages you will really maintain. Every language is a second copy of your site to keep current.
  • Have the translations written by a person who knows the language. Vabelon does not translate text for you.
  • You need WordPress 6.2 or later and PHP 7.4 or later.

Step 1: add your languages

  1. Install and activate Vabelon. Nothing on your site changes yet.
  2. Open Settings, then Vabelon. Your site language is already listed as the default language.
  3. Fill in the empty row for each new language: an address prefix such as es, the WordPress locale, the hreflang code, and the name of the language. Save.

The default language keeps the addresses your site has now. Each field is explained in add your languages.

  1. Create a new page and write the translation. Give it its own address ending, such as sobre-nosotros for about-us.
  2. In the Vabelon box in the editor, choose the language of the page. A Spanish page now lives under /es.
  3. Open the original page. In its Vabelon box, enter the ID of the translation next to its language, and update. The two pages are now linked as translations.

Start with the pages visitors land on most: the front page, your main service or product pages, and the contact page. If your front page is a static page, translate it the same way and /es will show the Spanish version. See the translated front page.

Step 3: add the language switcher

Add the shortcode [vabelon_switcher] where the language links should appear, usually the header or the footer. On a translated page, each link goes to the same page in the other language. The guide to adding a language switcher covers placement and styling.

Check your multilingual site

  • Open a translated page. Its address starts with the language prefix, such as /es/sobre-nosotros.
  • View the page source and search for hreflang. You should see one line per language, plus x-default.
  • Look at the opening html tag. Its lang value should match the language of the page. See the HTML lang attribute.
  • Use the switcher in both directions.

What stays the same

Pages you have not given a language are shown as the default language, so an existing site keeps working while you translate it one page at a time. Menus and categories are shared by all languages. More in what happens to existing content.

Built by