# Polylang Integration

{% embed url="<https://youtu.be/Aowt0pBaLtg?si=Qu2jIVUcDYqrNk1G>" %}

The integration of **Polylang** with **MasterStudy LMS** allows you to create and manage multilingual content within the LMS. It supports the translation of **courses, lessons,** **assignments,** and other components, helping you deliver content in multiple languages.&#x20;

<details>

<summary>What's the difference between Loco Translate, WPML and  Polylang?</summary>

Loco Translate, Polylang, and WPML are all tools designed to help translate WordPress websites, and MasterStudy **has been integrated with all of them**, but they serve different purposes.&#x20;

* [**Loco Translate**](https://docs.stylemixthemes.com/masterstudy-lms/additional-features/plugin-translation/loco-translate) is mainly used for translating theme and plugin strings directly within the WordPress dashboard. It focuses on localization rather than creating a multilingual site, making it ideal for translating static text like button labels or error messages.&#x20;
* [**Polylang**](https://docs.stylemixthemes.com/masterstudy-lms/additional-features/polylang-integration), on the other hand, is a full-featured multilingual plugin that allows you to create separate versions of your posts, pages, and custom post types (like courses in MasterStudy LMS) for each language. It gives you manual control over translations and is a great choice for building multilingual websites.&#x20;
* [**WPML**](https://docs.stylemixthemes.com/masterstudy-lms/wpml) is another multilingual plugin, but it's a premium solution offering a more advanced feature set, including automated translations, multilingual SEO, and compatibility with a wide range of themes and plugins. It’s particularly well-suited for complex or professional websites that require robust translation workflows.&#x20;

In summary, Loco Translate is for localizing site elements, while Polylang and WPML are for managing full multilingual content—Polylang being more lightweight and free, and WPML offering more automation and support at a cost.

<table><thead><tr><th width="232">Feature</th><th>Loco Translate</th><th>Polylang</th><th>WPML</th></tr></thead><tbody><tr><td>Translates content</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Translates theme/plugin strings</td><td>✅</td><td>✅</td><td>✅</td></tr><tr><td>Multilingual support</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Automated translation</td><td>❌</td><td>❌ (with addon)</td><td>✅</td></tr><tr><td>Free version available</td><td>✅</td><td>✅</td><td>❌ (paid only)</td></tr><tr><td>Ease of use</td><td>Simple</td><td>Moderate</td><td>Advanced</td></tr></tbody></table>

</details>

## Polylang Installation and Setup Wizard

The **free versio**n of Polylang can be installed from the WordPress repository.

{% hint style="success" %}
**The free version** of **Polylang is enough** to create a **multilingual website**. However, if you want to get the premium features of the plugin, you have to purchase it separately. Polylang Pro features can be[ **checked here.**](https://polylang.pro/downloads/polylang-pro/)
{% endhint %}

{% stepper %}
{% step %}
Follow **WP Dashboard > Plugins > Add New Plugin** and search for **Polylang**. Install and activate it:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FOYWWZwIvjUyGmUJdw6Xi%2Fimage.png?alt=media&#x26;token=fde74bcf-a7e7-4375-90be-229d2db33f5d" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
After the plugin is activated, the quick setup wizard opens. On the first **Languages** step, you have to add the languages that you will use on your website, **including the primary language**. As an example, **English** :flag\_us: and **Spanish** :flag\_es: have been added as languages. Once you are done, proceed by clicking the **Continue** button:

{% hint style="warning" %}
**The first language you add** becomes the **default language** of your multilingual website.
{% endhint %}

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FDOG1ptbCHPWta35k38Xq%2Fimage.png?alt=media&#x26;token=a7709cc5-4747-412b-b91a-45ea45c8ef14" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you skip the Setup Wizard accidentally, you can access it later by following **WP Dashboard > Languages > Setup.**&#x20;
{% endhint %}
{% endstep %}

{% step %}
In the **second step**, you can enable the media translation option. You must activate media translation if you want to translate the **title**, **the alternative** text, the caption, or the **description** of the media.&#x20;

{% hint style="info" %}
**It's optional** and **does not affect your LMS content**. So you can enable or disable the setting according to your needs
{% endhint %}

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2F7eJzwPilH9jnJK0UGMnI%2Fimage.png?alt=media&#x26;token=998566fd-aec3-4935-9aaa-ae444912ce8b" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
On the **Content** tab, you have to **choose your website's primary (default) language**. In my case, English is the primary language. All of the existing content on your website will be assigned to the chosen language:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FAVzjoqjLdocEXuCBM8Ps%2Fimage.png?alt=media&#x26;token=0b477ee7-2501-4160-ac87-ed9753b2875e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
You will be notified about your homepage and its primary language during this step. Just check the information and proceed by clicking the **Continue** button:&#x20;

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FFyA3bYlJIdAKuOLX8dNi%2Fimage.png?alt=media&#x26;token=34847c7d-4825-4750-88a8-cfd9ca8de649" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
This step concludes the setup wizard of **Polylang**. You can go back to the Dashboard.&#x20;

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2Fhr1QVwbZ5fYxzXaBfaBy%2Fimage.png?alt=media&#x26;token=6745c448-442a-48f9-ac4f-ae1a99b574db" alt=""><figcaption></figcaption></figure>

You can get more information about Polylang from their official documentation:

{% embed url="<https://polylang.pro/doc-category/getting-started/>" %}
{% endstep %}
{% endstepper %}

## Setup Polylang

Settings of Polylang can be accessed via **WP Dashboard > Languages**. It consists of three tabs:

* **Languages** - on this tab, new languages can be added, or existing ones can be modified
* **Translations** - core string translations can be done here
* **Settings** - the tab includes the core settings of the Polylang plugin&#x20;
* **Setup**  - opens the setup wizard to do the quick setup

***

#### For Polylang Pro Users:

If you are using the Pro version of Polylang, make sure to set the custom URL for the courses page. It can be done from the **Translations** tab - change the slug for courses in other languages and **save** the changes:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FKX4PtgNt4hfQrb0NDs4m%2Fimage.png?alt=media&#x26;token=034b12d9-a92d-4cc5-9f99-5a8e529bcd5b" alt=""><figcaption><p><strong>WP Dashboard > Languages > Translation > Courses</strong></p></figcaption></figure>

## Translating LMS Pages

Before translating [LMS Contents](#user-content-fn-1)[^1], it's crucial to create translations of the [**LMS Pages**](https://docs.stylemixthemes.com/masterstudy-lms/lms-settings/lms-pages). Let's see how to translate them as an example of the **User Account** page.&#x20;

{% stepper %}
{% step %}
Follow **WP Dashboard > Pages > All Pages** and click on the ➕ icon in the Spanish column to create a Spanish duplicate of the page:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FRwGbPZf4Lrd0UehDzTBF%2Fimage.png?alt=media&#x26;token=a3a6462b-4e5a-4055-9132-2e567b396fc4" alt=""><figcaption><p>WP Dashborad > Pages > All Pages - Highlighted LMS Pages</p></figcaption></figure>

{% hint style="info" %}
All pages labelled with '**MasterStudy**' should have their translations into the target language. In our example, it's Spanish.
{% endhint %}
{% endstep %}

{% step %}
Write the title of the page. It's crucial to generate the URL of this page in Spanish. Then publish the page:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FEHDbIQ5sQkivDfFnLZyd%2Fimage.png?alt=media&#x26;token=e2ab33bb-81ca-4b46-89ca-a5359e142b79" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
That's all. Here is the result:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FmcCoyhTCqwNYA1qpxUmN%2Fimage.png?alt=media&#x26;token=44d25a7c-2ac1-46be-8eac-37b3212cc2c8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Repeat the same process to translate the rest of the pages. MasterStudy comes with the translation of the [popular languages. ](#user-content-fn-2)[^2]
{% endhint %}
{% endstep %}
{% endstepper %}

Now you can go and translate your **LMS Contents.**

[^1]: Courses, Lessons, Quizzes, Assignments

[^2]: Dutch, French (France), German, Italian, Portuguese (Portugal), Russian, Spanish (Spain), Spanish (Spain), Turkish, Ukrainian
