Setting up WPML multilanguage with the Perfetta open-source theme

Last Updated:

Perfetta, our free WordPress theme, offers full compatibility with the premier translation plugin available for WordPress; WPML. In this tutorial, we’ll provide information on installation and translation of your site content, with links straight from the source for effective, clear guidance on making your site multilingual.

If you are interested in seeing how a multilingual site built with Perfetta and WPML might look, check out the public test site for this theme here

What You’ll Need

To make your Perfetta-powered WordPress installation multilingual, you’re going to need access to the WPML plugin. There are several levels of WPML available for purchase, covering the needs of basic blogs to full-weight websites. It is recommended that you go with full Multilingual CMS support, as this will allow you to translate widgets, custom fields and other strings, such as the site title. You’ll need to install the main WPML package, along with the String Translation and Translation Management modules, which give you more complete control over your translation content.

Attention: In order for WPML to work correctly with Perfetta, you should have a minimum of version 1.1.2 of Perfetta and version 3.1.8 of WPML installed; if you install versions earlier than this you may encounter bugs and issues that prevent full functionality of the plugin.

Getting Started

First things first; make sure that Perfetta is installed and activated in your WordPress installation. If you haven’t done this yet, you can find an in-depth guide in our documentation, here.

Next, you’ll need to install the main components of WPML; the main sitepress-multilingual-cms package and the additional wpml-string-translation and wpml-translation-management plugins.

Once the packages are installed, you will be able to finish configuration of the plugin by navigating to WPML → Languages in the left-menu of your WordPress dashboard; here you will be able to specify the base language of your website as well as any additional languages you intend to support. Bear in mind that you can amend the supported languages later, so don’t worry if you forget to add all the ones you support. You may also enable the language switcher as a widget, but this is not recommended for Perfetta; instead, set the language switcher to appear in the WP Menu.

Language Switche in the Menu

Doing so will display the language switcher at the top of the post listings:

Language switcher in the menu

For more in-depth information on the setup process and options, check out the WPML Getting Started Guide.

Translating your Content

There are three main areas of the theme that should be translated; the site title and tagline, the menus, and of course your posts. For more information on content translation, read through the Full Guide available on the WPML website.

Translating Posts or Pages

To translate a post, navigate to your post list by clicking on Posts → All Posts in the left menu of your WordPress dashboard, then click on the post you wish to translate. Once on the Edit Post screen, you will see a Language section in the sidebar:

language section

Simply click on the Translate button to create a new blank translation of the post. Alternatively, you may tick the Duplicate tickbox and then click the Duplicate button that appears to copy all content, including images, to the translation version of the post for easy reference.

duplicated content in language section

The same process applies to pages; simply select your page to translate from your page list (Pages → All Pages in the left-menu).

Translating Menus

You may offer multiple versions of your menus, with custom translations for each language. To do so, you will need to create a new menu by clicking on Appearance → Menus in your WordPress backend.

Once on the menu screen, click on Create a new menu to be taken to the Edit Menus screen. Here, you can choose your menu’s language, and create the menu as normal. When assigning menus on the Manage Locations tab, you may click on the language switcher on the top bar to change which language’s menus are being assigned:

Backend language switcher

Translating the Blog Title and Tagline

To translate the blog title and tagline, you will need to access the String Translation options included with WPML. In your WordPress backend, click on WPML → String Translation to go to the appropriate section.

Once there, you will see a list of available strings; these cover anything outside of posts, pages and taxonomies. There should be two elements in the list; Tagline and Blog Title:

String Translation section

For each element, click on the Translations text in the right column; a box will open where you may set your translations of these strings per language.

Title translated

Translating the Widgets

There are two widgets used in the demo layout of Perfetta; both text widgets that display opening times and contact details respectively. Translating these text widgets is achievable via the string translation option of WPML, as with the blog title and tagline translations.

Open the string translation area by clicking on WPML → String Translation in the left-menu. In the list of available strings, you should see the widget content, with separate strings for the Widget Title and Widget Body.

widget translation

Simply click on the Translations text next to the string you wish to translate, and enter your translation as with the blog title and tagline sections.

More information on string translation is available on the WPML Website.

Using Translation Management

Translation Management is a powerful feature in WPML that allows site admins to monitor, assign and manage translations on their site, as well as add translations without affecting the base WordPress post editor. More details on this useful feature may be found here.

Translating Page Slugs

You may wish for the URLs of your translated content to display unique data separate from the original language’s page slug. WPML offer a tutorial on this feature here.

Scanning Strings coming from a theme or plugin

Some themes or plugins have their own content strings that are output to the front or backend. In these cases, WPML can scan for strings from the theme or plugin so that you may offer translations if necessary. More details on performing this action may be found here.

More information

We hope that this guide has proven useful in getting your translations started, and if you should require further information regarding WPML or its add-ons, make sure to stop by the WPML website, where a wealth of information is available.

Setting up WPML multilanguage with the Perfetta open-source theme 5.005 (100.00%) 2 votes

This article was first published

Villa Belluci - View our NEW theme

Tutorials & tips delivered regularly

Expand your purchase with regular tutorials and tips to making your site better, direct to your email.