The Polylang plugin allows you to create a bilingual or multilingual site.

How it works is you write your posts, pages, categories, tags in both languages, or multiple languages, and then readers click on the Language switcher you’ve added to your sidebar or custom menu to read your content to their language.

To use the Polylang plugin you first need to activate it in Plugins > All.

Configure languages

Once you have activated the Polylang plugin you will find a new menu button in your dashboard called Languages. Clicking on this will open up a further set of menu options: Languages, Strings translations, Settings and Setup.

Polylang language settings options

The first thing you would need to do is to select the languages you want to use.  You need to select the original language the site is written in as well as all the languages you will be using on the site.

You set the languages as follows:

1. Go to Languages > Languages

Polylang language settings options

2. Select your first language from the Choose a Language drop down menu.

The first language you select should be the original language the site is written in.  This is the default language that someone sees the first visit they visit your site.

add new language

3. Once you have selected your language, fill out the fields such as the language full name as it will appear on your site (for example: English).

You can also select your text direction, choose a flag for the language, as well as the position of the language in the language switcher.

add new language

4.  Click Add New Language.

Add New Language

5.  Select your next language from the Choose a Language drop down menu.

Select next language

6.  Change the order to 1 and then click Add New Language.

Change order

7.  You should see both languages listed in the module on the right.

Repeat the process to add all additional languages if you are creating a multilingual site.

Language module

8.  The first language you added is automatically listed as the default language and is highlighted by the “star” icon.   This is the language the site defaults when someone first visits your site.

Click on the ‘Star‘ icon next to your preferred language if you need to change the default.

Polylang preferred language setting

String Translations

The strings translation tab in Languages > Strings translations is used to translate the site title, tagline and widget titles into the different languages you’ve selected.  The strings translation tab appears once you’ve added more than one language.

You use it as follows:

1. Go to Languages > Strings Translations

Polylang menu with String Translations option highlighted

2.  You’ll see each item you can translate listed on the page.

Translate

3.  Edit the translation fields to change the site title, tagline and widget titles from the default language to the other language.

Translated

4. Click Save changes.

Publish Posts / Pages

Every post and page you publish needs to be translated into every language.

You do this as follows:

1.  Go to Posts > Add New (or Pages > Add New)

2.  Write your post title, post content, categories and tags in your original language and then click Publish when you have finished the post.

Make sure your original language is selected in the language module.

Polylang translation options

3.  Click on the + icon next to the next language to write the post on the other language.

Polylang translation options, choose translation language

4.  The post editor will load a new page with the next language selected and a link to the original post.

Polylang "original post" setting

5.  Write your post title, post content, categories and tags in your next language and then click Publish when you have finished the post.

Repeat the process for every language if you are setting up a multilingual website.

Below is what it looks like in Posts > All Posts.

All posts page
  • The ‘pen’ icon indicates the post has been translated into another language.
  • The ‘check’ icon is used to highlight which language the post was published in.
  • The ‘+’ icon means the post hasn’t been translated.

Add Translation Widget

Your readers switch between languages using a language switcher in the sidebar and/or a language switcher in a custom menu.  The language switcher only displays in the sidebar when at least one post or one page has been published in that language.

1. Go to Appearance > Widgets

Polylang Widgets menu item


2.  Add the Language Switcher widget to the sidebar.

Language switcher widget
  • Display as dropdown: by default, languages are displayed as a list.  When selecting the dropdown,  the list will display only the language names and no flags.
  • Display language names: selected by default and allows you to choose to display the “Full name” of the language.
  • Display flags: display the flags associated to the language. You can choose to display either the languages names or flags or both.
  • Forces link to front page: when selected, the visitor will always be sent to the front page even if the current page is translated
  • Hides the current language: select this option to hide the current language.
  • Hides languages with no translation: if the current page is not translated into the other language, the language switcher will not display that language.

3. Click Save

Set Up Menus

Your readers switch between languages using a language switcher in the sidebar and/or a language switcher in a custom menu.  The language switcher only displays in the menu on the front end if at least one post or one page has been published in that language.

A custom menu for each language is needed for your site navigation and is set up as follows:

1. Go to Appearance > Menus

Polylang menu showing the Menus option

2. Add your menu name for your original language and click Create Menu.

In our example we’ve given the first menu the title English menu.

Poylang, adding name for your original language

3.  Add the language switcher to the menu and add any pages, custom links and category pages to the menu.

Refer to custom menu support documentation for more information.

add language switcher

4. Assign your menu to the correct theme location.

5.  Click Save Menu.

Click Save menu

6.  Click on ‘Create a new menu‘  to set up the menu for your next language.

Polylang , create new menu option

7.  Add your menu title and click Create Menu.

Next menu

8.  Add the language switcher, add any pages, custom links, category pages to the menu then assign your menu to the correct theme location and click Save Menu.

Refer to custom menu support documentation for more information.

9.  Repeat the process to create custom menus for all additional languages if you are creating a multilingual site.

Troubleshooting

Please contact Edublogs support if you see a Page not found error message on your blog post page after activating the Polylang plugin.