Article sections

    Materialis is compatible with one of the most popular plugins for translating site content: WPML.

    To use WPML for translations, you need to follow the steps below.

    Install and activate the plugin

    In the WordPress Admin dashboard, go to Plugins -> Add New, in the left-hand menu.

    In the upper part of the screen, press “Upload”, to upload the WPML plugin. Then click “Install Now”. After the plugin has been installed, click “Activate Plugin”.

    Then, go to Plugins -> Installed Plugins, to check if WPML has been correctly installed and activated.

    Configure the plugin

    After having installed and activated the plugin, a new section will be added in the left-hand menu of the Customizer. Click on WPML -> Languages, to configure the plugin.

    Configuration steps:

    1. Set the current content language (this is the default content version)

    Click “Next”.

    1. Select the target languages (these are languages content is supposed to be translated to)

    Click “Next”.

    1. Set the language switcher which users will use to access content in other languages.

    You can set a language switcher in menu, in widget area or in footer. You can decide the order for languages that appear in the language switcher.

    Click “Next”.

    1. Skip compatibility settings and enter the key for the site. Then click “Finish”.

    You’ll be taken to a page with further settings for WPML.

    Settings for WPML

    1. Site languages – here, you can change the default language, or you can Add/Remove languages.
    2. Language URL format – here, you decide which format the URLs corresponding to translated page versions will have: you may place different languages in directories (/MATERIALIS_NEW/fr/ – French), you may add a different domain per language, or you may add language name as a parameter (MATERIALIS_NEW?lang=fr – French)
    3. Language switcher options – you can decide to change the order of languages in the language switcher. You can also enable the option to link to default homepage in case of missing translations.
    4. Footer language switcher – from here, you configure the language switcher as it will be displayed in the site footer. You can choose to display languages in a horizontal list/vertical list and decide what to include in the language switcher (e.g. flag, native language name, language name in current language, current language).
    5. Links to translation of posts – for each post, you can add links to the translated versions in the target languages.
    6. Browser language redirects – these options refer to what content you serve to users, in different cases:

    – disable browser language redirect (users will switch to another language, based on their own choice)

    – redirect visitors based on browser language only if translations exist (if users speaking a different language access the website from their location, the website content will be displayed in the respective language, based on browser language)

    – always redirect visitors based on browser language (redirect to homepage if translations are missing)

    Translating pages/posts using WPML

    In the left-hand menu of the WordPress Admin dashboard, go to Pages -> All pages.

    Select the page you want to translate, and click on the + sign next to that page, in the column corresponding to the target language you want a translation for.

    Add a title for the translated page.

    Copy the content from the original page and paste it into the new page, to translate it in the target language.

    Click “Publish”.

    Then, go back to the table of pages, and you’ll see a new page (translated version of the original one) has been added to the list.

    The same goes for Posts, which you can translate similarly to pages.