Multilingual WordPress website with Polylang

Making a WordPress website multilingual? That's no problem with the free version of the Polylang plugin.

WordPress does not yet have the inherent ability to create a multilingual website. Of course, you could fill each page with content in different languages, but this is not the wisdoms last end. This is not the wisdom last end. The menu items should be offered in different languages, as well as the name and subtitle of the website. And finally, it would be nice if you could click on a different language in the language switcher on a page or a post to go directly to the different language version of the same content.

Table of Contents

A plugin is required for the proper setup of multilingual WordPress websites. Three plugins for multilingualism are very popular in the WordPress community and are therefore widely used:

The first two plugins can already be used in a free version (there is also a Pro version that requires a license), while WPML must be licensed annually.

More plugins for setting up multilingual websites with WordPress:

In this tutorial, I will show you how to use the free version of Polylang can set up a multilingual website and what the limitations are compared to the Pro version.

Setup of Polylang

Polylang from WP SYNTEX
Polylang from WP SYNTEX

Die Installation von Polylang erfolgt auf die in WordPress übliche Weise. Suchen Sie im WordPress Backend unter „Plugins“ / „Installieren“ nach Polylang from WP SYNTEX und klicken Sie auf „Installieren“, danach auf „Aktivieren“. Danach sollte sich das Plugin als aktiviert in Ihrer Plugin-Liste zeigen.

Nun können Sie den Assisten von Polylang, den Polylang Wizard, für die rasche Erstkonfiguration des Plugins nutzen (Klick auf den Link „Einstellungen“ beim Plugin).

Polylang: Activation

Fügen Sie erst einmal die aktuelle Sprache der Website hinzu, hierzulande in den meisten Fällen wohl „Deutsch“.

Polylang Setup Assistant: Languages
Polylang Setup Assistant: Languages

Click on + Add new language fügen Sie nun die erste weitere Sprache hinzu. Wir wählen dazu „Englisch“. Natürlich können Sie hier auch weitere Sprachen hinzufügen, aber für diesen Artikel beschränken wir uns auf Deutsch und Englisch.

Dann klicken Sie auf „Weiter“.

Polylang Setup Assistant: Languages
Polylang Setup Assistant: Languages

In the next step, you can specify whether you would like to create alternative image texts in other languages. We think this is a good idea, so we activate this option.

Polylang Setup Assistant: Media
Polylang Setup Assistant: Media

In the next step, you assign all existing content to a language, which then becomes something like the default language of the website.

Polylang Setup Assistant: Contents
Polylang Setup Assistant: Contents

Now complete the Polylang setup wizard and switch to the plugin settings.

Polylang settings

Unter den Einstellungen (erreichbar im WordPress Backend unter „Sprachen“) können Sie angeben, wie die URLs der Sprachvarianten aussehen sollen. Wir entscheiden uns für die häufigste und einfachste Variante. Die Standarsprache benötigt kein eigenes Sprachverzeichnis (/de/), aktivieren Sie daher die Option „URL Information für die Standardsprache verstecken“.

But the content of the second language should appear in a URL structure such as /en/.

Polylang settings: URL customizations
Polylang settings: URL customizations

Translating character strings

As mentioned above, a website also contains designations that are assigned to the entire website. These should also be displayed in the second language.

Um etwa den Namen und den Untertitel der Website übersetzen zu können, rufen Sie unter „Sprachen“ den Punkt „Übersetzungen von Zeichenketten“ auf. Bearbeiten Sie nun die Texte in der jeweiligen Sprache, und wenn Sie möchten auch die Formats for date and time, und klicken nach Fertigstellung auf „Änderungen speichern“.

Polylang: Translations of character strings
Polylang: Translations of character strings

„blogname“ steht für den „Titel der Website“ und „blogdescription“ steht für den „Untertitel“.

Translate page/article

Call up the list of pages and first display all languages (top horizontal bar).

Polylang: Language change in the admin menu
Show all languages

This could look something like this for a fresh WordPress installation:

Polylang: List of pages at Show all languages
Pages in all languages

You can see that the Example page is available in German, but there is no version for English yet. Click on the plus symbol in the column with the US flag and create the content for the English equivalent of the example page.

If there is already an English version of the sample page, you will see a pencil icon in the list instead of the plus symbol. You can also click on this to edit and update the English content.

Die englische Version erreichen Sie allerdings auch über den Bearbeitungsmodus der deutschen Seite. Öffnen Sie dazu den Punkt „Sprachen“ unter den Seiteneigenschaften der deutschen Seite, und klicken Sie auf das Stift-Symbol bei der US-Flagge. Dadurch wechseln Sie in den Bearbeitungsmodus der englischen Seite.

Polylang: Page - Translations
Page: Translations

Auf diese Weise werden die verschiedenen Sprachversionen von Seiten (und Beiträgen) einander zugeordnet. Im Bild darüber können Sie sehen, dass „English Sample Page“ die englische Version der deutschen „Beispielseite“ ist. Erst wegen dieser Zuordnung kann der Sprachumschalter korrekt funktionieren. Denn wenn Sie einfach nur eine englische Seite namens „English Sample Page“ erstellen, ohne diese Seite der deutschen Seite „Beispielseite“ zuzuordnen, werden Besucher:innen nicht direkt zwischen den beiden Sprachversionen per einfachem Klick wechseln können.

You can and should also use different permalinks use, for example /example page/ for the German-language version and /en/sample-page/ for the English-language version.

However, you can only use Polylang Prothe premium version of Polylang, the same slugs (permalinks) for Pages, posts, categories, etc. use:

In the free version you only achieve something like:

But in this case, the English version of the page is more likely to be this:

Media

Bei der Ersteinrichtung von Polylang hatten wir angegeben, dass wir Bild-Alternativtexte auch in anderen Sprachen anbieten möchten. Sie können sich daher die Bilder in der Medienübersicht in Listenform anzeigen lassen, und so wie bei Seiten oder Beiträgen eine „Übersetzung“ von Bildern hinzufügen. Damit stehen die „übersetzten“ Bilder auch in der Zweitsprache so zur Verfügung, dass Sie diese Bilder mit eigenen Alternativ-Texten für die weiteren Sprachen ausstatten können.

Polylang: Media
Translate media

Das „deutschsprachige“ Bild kann nun mit einem deutschen Alternativtext in der Seite/im Beitrag versehen werden, demselben Bild können Sie dagegen in der zweitsprachigen Seite/Beitrag einen anderen Alternativ-Text zugeordnen.

Note: the image will be not stored multiple times on the server.

Website visitors should be able to click on a Language switch be able to switch between languages in the menu. The language switch should therefore be added to a menu.

Bearbeiten Sie das deutschsprachige Menü (in unserem Beispiele haben wir es „top“ benannt), und fügen Sie dem Menü den Sprachumschalter hinzu.

Polylang: Menu
Add language switcher for menu

You can edit the display of the language switcher. For example, we do without the flag display and instead select the entire language name.

Polylang: Language switch for the menu
Language switcher for edit menu

Wechseln Sie in der oberen horizontalen Leiste zur Zweitsprache und erstellen Sie für die Sprache ebenfalls ein Menü. Fügen Sie nun auch diesem Menü („top EN“ in unserem Beispiel) den Sprachumschalter hinzu. Vergessen Sie nicht auf die Platzierung des Menüs („Position im Theme“).

Polylang: English menu
English menu

Bearbeiten Sie eventuell noch deutschsprachige Menüpunkte. So könnten Sie „Startseite“ für die englische Ausgabe in „Home“ umbenennen.

Polylang: Rename menu item
Rename start page to Home

Ready! Ready!

A language switcher is also available as a widget that you can integrate into the footer, for example.

Widget Polylang language switcher
Widget Polylang language switcher

Please note that the language switch will only work correctly later if you have previously assigned the other language version to the pages (see above).

Contribution categories

Eine Beitragsliste können Sie in WordPress auf mehrere Arten anbieten. Sehr gebräuchlich sind dafür die Nutzung einer „Beitragsseite“ und alternativ das Hinzufügen von Kategorien zum Hauptmenü.

Contribution page

Wenn Sie die Variante der Beitragsseite nutzen (weil Sie vielleicht sowieso nur eine einzige Kategorie nutzen), dann erstellen Sie eine leere Seite, und ernennen diese unter „Einstellungen“ / „Lesen“ zur Beitragsseite. Diese können Sie nun auch als korrespondierende Seite in der Zweitsprache anlegen, und beide Seiten zu den jeweiligen Sprach-Menüs hinzufügen.

Für alle Sprachen müssen Sie dabei unter „Einstellungen“ / „Lesen“ eine static page as homepage so that you also have a Contribution page can use.

Add categories to the menu

When using categories in the menu, proceed in the same way as when translating posts or pages. You create a corresponding category in the second language. This category can or should have a name in the other language and therefore also a different permalink. In our case:

  • German:
    • New / new
  • English:
    • News / news
Polylang: Categories
Categories at Polylang

Assign contributions in the second language to this category.

Polylang: Contributions
Contributions in other languages

Of course, not every article has to be available in translation; you can also offer articles in just one language.

Conclusion

With Polylang, you can quickly produce a satisfactory multilingual output of a WordPress website. And this is already possible with the free version of the plugin.

The Pro version of Polylang provides a few additional features that may be indispensable for some applications.

  • Language switcher also for widgets
  • Translation of permalinks also for custom post types, taxonomies and more
  • Duplicate posts/pages for languages
  • Activate and deactivate languages
  • Further integration with the ACF Pro plugin
  • Premium Support

Polylang additives

In addition to Polylang, you can also Lingotek Translation for the translation of your texts. The translations can be done either by machine, by professional translators or with the help of a community. However, the number of requests for this service has been increasing recently (2021) negative reviewsso it is better to test this on a test website first.

If you are currently using WPML and would like to switch to the possibly somewhat clearer Polylang, you can use the plugin WPML to Polylang use.

For the recommendation:

Would you like to be informed quickly about new articles and more?

Then we recommend that you subscribe to our newsletter "Online Marketing News from E-Werkstatt".


Heinz Duschanek
Heinz Duschanek

Heinz Duschanek founded the online marketing agency E-Werkstatt in 2003. Having previously worked in radio (Radio CD International, Ö1, Ö3), he is now particularly pleased with the direction that online marketing is taking. This gives him an excuse to buy lots of electrical devices and gadgets for audio and video.

Heinz is also interested in Tango Argentino (since 2009), Lindy Hop, Wing-Tsun, boxing and (jazz/blues) guitar.

9 Comments

  1. Hello Heinz,

    Clear article, would be nice if you could also mention MultilingualPress. German support and particularly suitable for scalable and flexible websites where performance and SEO optimization are important 🙂

  2. Hello,
    ich bekomme beim installieren die Fehlermeldung „Datei existiert bereits“.
    Unfortunately I don't know which ones and where I can find them

    • Mit FTP auf den Server schauen, und im Verzeichnis wp-content/plugins/ nach „polylang“ suchen. Dieses Verzeichnis löschen, danach erneut die Installation versuchen.
      Or Polylang is already correctly installed on the server, as you should see in the list of your plugins.

    • Vermutlich weil Sie nicht wissen, wie man das tut. Bei Non-Full-Site Editing Themes (also „klassischen Themes“) gibt es im Backend den Menüpunkt „Design > Menüs“, dort können Sie neben Seiten auch „Individuelle Links“ hinzufügen.

      Individual links

      For full-site editing themes, you must edit the corresponding navigation block in the page header.

      If none of this is possible, it may be that you are not an administrator and therefore do not have sufficient rights.

  3. Hallo. Ich habe eine weitere Sprache eingefügt und wollte den Sprachenumsteller auch in das entsprechend angelegte Menü einfügen. Jedoch steht mir bei „Menüeinträge hinzufügen“ die Auswahl nicht wie oben dargestellt zur Verfügung. Gibt es einen Tipp, wie ich das wieder einblenden kann, bzw. wie ich das sonst in die neue Sprache eingefügt bekomme? Danke und Grüße.

    • If the language switch is already there, you do not need to add it again. Only one more language will be added (automatically).

      Here is a screenshot of the menu of a simple polylang website. If you do not see the language switch, there may be a technical problem (plugin incompatibility).

      Language switch menu

Leave a Reply

Your email address will not be published. Required fields are marked *