Knowledge Base

Working with Polylang

These notes are provided for reference only, please consult the Polylang documentation or plugin author for assistance. WPML remains the recommended multilingual plugin for multilingual sites.

This guidance assumes you have KnowAll installed with a single language and default settings, wishing to add a second language with Polylang.

Install and activate Polylang

Polylang can be added from Plugins > Add New.

Configure Polylang site languages

The Polylang setup will guide you through the initial installation steps.

  • (Languages)
    • Note the first language added will be the default language
  • (Media)
  • (Content)
  • (Ready)

Allow articles, article categories and article tags to be translated

Polylang needs to be configured to enable the knowledge base content to be translated.

This can be done from the settings in Languages > Settings > Custom post types and Taxonomies

Check URL settings

Depending on how your site is configured, check the URL settings from Languages > Settings > URL modifications.

This guide assumes the configuration in the screenshot below.

Add a language switcher to the menu

Create a menu item from Appearance > Menus

Tip: If the Language switcher item is missing – Ensure Language Switcher is enabled from Screen Options > Boxes from the top-right of the menu screen.

Add Menu to all language site header menus (an/or footer) and be sure to Save the menu.

If you have no content in alternative language only the main language will be displayed, let’s translate some content.

Create translations of the article categories (and article tags where required)

Open the Article Categories edit screen in Knowledge Base > Article Categories.

Click + icon next to an existing category add a translation for the language in that column. A new category will be created which will be linked to the original category. Enter the translation details and click Save.

Follow the same process for tags from Knowledge Base > Article Tags.

Create translations of the articles

View all the articles from Knowledge Base > All Articles.

Tip: It’s possible to filter the current language visible in the WordPress administration screens, from the Show All Languages drop down. If an article/taxonomy is not visible, it’s possible it may be excluded by this filter.

Click on + icon to add translation for the article for that language in the column.

Check categories & tags, these should automatically be added if translated in the step above.

Translate theme strings

Static strings, not related to content can be translated with the Polylang string translation options.

These are managed from Languages > String Translations. Ensure sure all languages selected (or language you want to translate)

Watch out: If a translation is not visible or not been translated, you may need edit/save the original main language string (eg the string How can we help? is set from Appearance > Customize > Homepage, try editing and saving this text to make it translatable from String Translations). Certain strings may only be registered once they are first updated/changed.

Translate widgets

Some widget text will be translated, if not, add a variation for each language from Appearance > Widgets. Create a duplicate of the widget and assign to a specific language.

Final result

The final result will be different variations of your site for each language.

Current Limitations

We are aware of the following limitations of the Polylang plugin and HeroThemes’ products:-

  • Breadcrumbs only work for main language
  • Search will return results from all languages

Was this article helpful?

Related Articles