3heads-gear3headschatchecklistglobehead-lockhead-plusimaclife-ringlogo-cornelllogo-melbournelogo-northhamptonlogo-portsmouthlogo-small logo-vancouverlogo-yokohamamail-line mail-wings pdf pie-chartplayplugprinter skype website
Print Friendly

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 need 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 Settings > Languages

Polylang Settings

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.

Select Language

3.  Polylang fills the fields underneath Languages once you’ve selected the language.

Fields fill

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.

Select default language

String Translations

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

You use it as follows:

1. Go to Settings > Languages

Polylang Settings

2.  Click on the Strings translation tab

String translation tab

3.  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.

Write post in English

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

+ sign

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

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

Post in Spanish

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

Widget
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

Menu

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.

Create English Menu

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.

For example, our menu is assigned to the ‘Primary Menu English’ under theme locations.

Menu location

5.  Click Save Menu.

Click Save menu

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

Create menu

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.

 

Spanish menu

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.