No results found. Try again with different words?

Search must be at least 3 characters.

How to Turn Astra Multilingual with WPML?

Sidebar Image

Did not find a solution? We are here to help you succeed.

The Astra theme is 100% translation-ready and compatible with WPML. This document will help you create a multilingual website with the WPML plugin.

Since WPML is a premium plugin, please make sure youโ€™ve purchased the WPML license before proceeding.

How To Setup WPML

For translating your Astra-based website with WPML, you will need several plugins. 

Install and Activate plugins

Letโ€™s see how you can download and install these plugins:

Step 1 – Login to your WPML account and download the following plugins from the โ€œDownload WPML manuallyโ€ section:

  • WPML Multilingual CMS
  • String Translation
  • Media Translation

Step 2 – Login to your website backend and navigate to Plugins > Add New > Upload Plugin. Choose the plugin .zip file and click the โ€œInstall Nowโ€ button to install a plugin. Install all mentioned plugins this way.

Step 3 – Activate all installed WPML plugins.

Step 4 – When you activate the โ€œWPML Multilingual CMSโ€ plugin, you will see a notification in your Dashboard to start configuring WPML.

You can click the โ€œConfigure WPMLโ€ button on the notice or navigate to WPML > Setup. This will activate the Setup wizard.

Setup Wizard

The setup wizard will guide you through the whole multilanguage setup process and preparing your website for translation:

Step 1 – The first wizard option, โ€œLanguagesโ€, is where you will add the languages you need. Choose your โ€œDefault languageโ€. This is your primary language for your existing website content.

Next, you need to add all other languages you wish to translate your website to by clicking on the โ€œ+โ€ icon. If you canโ€™t find your language in the dropdown list, you can create a custom language.

For our example, we will use English (default), German and French languages:

Once you have added all languages, click on โ€œContinueโ€.

Step 2 – In the next step, โ€œURL Formatโ€, you need to decide what will your URLs for different languages look like – different directories, different domains, or with added parameters.

Step 3 – On the third step (โ€œRegister WPMLโ€) you need to add your โ€œSite keyโ€. You can find this by clicking on โ€œGet a key for this siteโ€. You will be transferred to the โ€œSitesโ€ page on the WPML website.

Also, you do this manually by going to your WPML account. Log in, navigate to โ€œMy Accountโ€, and click on โ€œRegister WPML on your sitesโ€ (Account > Sites).ย 

On the โ€œSitesโ€ page, click on the โ€œAdd new siteโ€ button. You will be asked to add your website URL and confirm if this is a development or production website.

Once you click on โ€œFinishโ€, you will see a code – copy this code to the wizard field on your website. Click โ€œContinueโ€ to move to the next step.

Step 4 – In the fourth step, you should decide how you want to translate your website. You need to select if you want WPML to automatically create versions in all languages for all of your posts, pages, etc. (โ€œTranslate Everythingโ€), or do you want to choose what to translate (โ€œTranslate Someโ€).

If you choose โ€œTranslate Someโ€, you will also need to decide who will be allowed to do translations on the website. You can choose to allow it only for the administrator (โ€œOnly myselfโ€) or to allow this for more users on your website (โ€œIndividual translatorsโ€). 

You can also decide to use (paid) professional translation services through WPML (โ€œA Professional Translation Serviceโ€), and you can combine this with the โ€œIndividual Translatorsโ€ option, as both can be active and you can choose who will be translating which content.

If youโ€™re creating a website for a client, you can also set a โ€œTranslation Managerโ€ to choose the options and assign the translators.

For our example, we choose the โ€œTranslate What You Chooseโ€ and “Only Myself” option that shows up right after.

Step 5 – โ€œSupportโ€ is the step where you can opt-in to share your theme and plugin information with WPML to get faster support and compatibility alerts. For our example, we decided not to share this information.

Step 6 – If youโ€™re running some third-party plugins like WooCoomerce or WPForms, the next step (โ€œPluginsโ€) will recommend WPML components for these plugins (if any). If you need these to be multilingual too, we recommend you add these components.

To install and activate these components (plugins), mark them in the list and click โ€œInstall and Activateโ€. Otherwise, click on โ€œSkipโ€ to move to the last step.

Step 7 – For the last step, โ€œFinishโ€, WPML will add a language switcher to the bottom of your footer. You can edit or disable this one, and enable other language switchers by navigating to WPML > Languages.

Note:

If you have Astra Pro installed, you can use the โ€œLanguage Switcherโ€ element in the Header and Footer Builder and do all the settings in the Customizer.

The WPML plugin is now set, and additional languages were added to your website. Now you need to translate your content, media, and options.ย ย 

Media Translation Setup

Once you finish your WPML setup, you will see the notification to finish the Media Translation Setup. You can do this by clicking on the link in the notification or by navigating to WMPL > Media Translation.ย 

Once you navigate to this page, click on the โ€œFinish setupโ€ button. This will load all of your website media and automatically copy the media name from the original language. 

Thatโ€™s it – your media translations are set. 

In addition, if you wish to edit translations for your media at any time, you can click on the translation (pencil) icon for any media files in the list. Here, you will see the following settings:

  • Translate the file name
  • Use a different file – This can be used if you have a logo or images with translatable text

These additional settings are not obligatory, and you do them at any time for any media file.

Translating Pages, Posts, and Post Types in Astra

When you translate pages or posts with WPML, you get linked versions of pages or posts where each version is assigned a language. 

We will show you how to create the translated version of your page in just a couple of steps:

Step 1 – Navigate to Pages and check the column next to the page titles in the pages list. You will notice the WPML language options for each page. All pages are in your default language, and the column contains flags of the other language available.

Step 2 – To create a page version in another language, just click on the โ€œ+โ€ icon in the desired language column. This will open an Advanced Translation Editor that will allow line-by-line translation. 

By default, the editor will display content in โ€œdualโ€ mode, showing the original content and translation fields on the other side. 

We decided to add a French version of the page in our example:

Step 3 – To translate a line of the content, you need to click on the matching translation field for each line and provide the translation. Once you have added all translations, click on โ€œCompleteโ€ to create the translated page.

Keep in mind that you will not be able to click the โ€œCompleteโ€ button until you provide all translations. If you need to pause translating, just click on the โ€œBack to listโ€ button.

This will save your current progress and take you back to the page list. To mark the translation in progress, you will notice that the โ€œ+โ€ icon changed to the โ€œcogsโ€ icon. You can resume translating the page any time you want by clicking this icon.

Once you complete your translation and click the โ€œCompleteโ€ button, the translated version of your page will be automatically added and linked with the original. The page list shows that existing translated versions are represented by a โ€œpencilโ€ icon instead of a โ€œ+โ€ icon to mark that the translation exists.

When it comes to the page content, your designs will be automatically copied, and the original content will be replaced with the translated content:

Great, you just created your page translation.

Now you can repeat these steps for all pages and languages. You can also translate all of your posts and custom post types this way.

Translating Menus and adding a Language Switcher to the Header

Now that we have translated all pages and posts, itโ€™s time to translate the menus and manage your Language Switcher settings so website visitors can choose the language they want.

Before editing your menus, please check if activating the WPML plugin affected any of your permalinks or your menu locations in any way, and correct this.

Translate Primary (or any other) Menu

Now letโ€™s see how you can set your menus for each of the languages added. The menus can be translated similarly as pages or posts. Here, weโ€™ll show you how to translate your Primary Menu:

Step 1 – Navigate to Appearance > Menus and select your Primary Menu. Your primary menu will be set for your default language. In our case, this will be English.

On the upper right corner of the โ€œMenu Structureโ€ section, you will notice the translation options similar to those you used for translating pages:

Step 2 – To start translating your menu, click on the language translation option. We choose to translate the menu in our example to the French language.

Step 3 – Start by giving your translated menu a name (we used โ€œPrimary Menu – Frenchโ€). You will notice that the language and the original menu youโ€™re translating are already selected. Click on the โ€œCreate Menuโ€ button to create the translation.

Step 4 – Once your menu translation is created, you can add menu items. Keep in mind that you will see only translated pages and posts in your item list. Pages and posts that have not been translated into the language of the menu youโ€™re editing will not be available.

Step 5 – Once you add the appropriate language versions of pages, posts, and other items to the translated menu, click on โ€œSave Menuโ€ to save the changes you made.

You can translate your other menus this way too.

Managing the Language Switcher

Our final step here is to manage the Language Switcher and add it to the desired location. WPML provides its own out-of-the-box Language Switcher that can be added to your menus, widgets, and footer. 

You can add Language Switcher and manage all its settings at WPML > Languages. Here you will find two groups of settings:

  • Global โ€œLanguage Switcher optionsโ€ applied to all language switchers on your website,
  • Individual settings for each of the language switchers added to your website

In the global โ€œLanguage Switcher optionsโ€, you will find the following settings:

  • Order of languages: Set the order in which available languages will be shown in the switcher.
  • How to handle languages without translation: Choose if you want to with the content without translation – skip it or link it to the home page in the selected language.
  • Preserve URL arguments: If you use any of the plugins that need URL arguments to function properly, add these here to keep them when switching languages.
  • Additional CSS: You can use this option to add styling to your Language Switchers using CSS.

Individual settings can be applied to each of the language switchers in different language switcher sections. These sections are:

  • Menu language switcher.
  • Widget language switcher.
  • Footer language switcher.
  • Link to translation of posts.

Adding A Language Switcher

As an example of how to edit these settings and add the language switcher, weโ€™ll be adding the Language Switcher to the Primary Menu. Please follow these steps:

Step 1 – Navigate to WPML > Languages and scroll down to the โ€œMenu language switcherโ€ section.

Click the โ€œAdd a new language switcher to a menuโ€ button. This will open a popup for adding a new menu language switcher.

Language Switcher Settings

Step 2 – Choose to which of your menus you would like to add this language switcher. We will choose the โ€œPrimary Menuโ€ here.

Step 3 – Select if you want to show the languages as a dropdown menu or the list of languages.

Step 4 – Decide how the languages should be represented: by the flag, native language name, or the name in the current language. Also, here you can select if you want to show or hide the โ€œcurrent languageโ€ option.

Step 5 – In the end, set the language switcher colors. Click save to add your Language Switcher:

WPML Language Switcher

Great job, your multilingual website is ready for visitors.

Other WPML Settings

In addition, at WPML on your WordPress dashboard, you can find a lot of additional settings for your multilingual website.

For more details, or help and assistance working the WPML plugin, you can check the official WPML documentation.

Was this article helpful?
Sidebar Image

Did not find a solution? We are here to help you succeed.

Related Docs

Join 1,653,898+ Happy Site Owners Using Astra

Whether you are a beginner, small business owner, or professional web developer, Astra provides all the tools you need to easily build your beautiful WordPress website.

Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form