# Loco Translate

{% embed url="<https://www.youtube.com/watch?v=eeGoKG3Y8BQ>" %}

The easiest way to translate the plugin is by using the [Loco Translate](https://wordpress.org/plugins/loco-translate/) plugin.

{% hint style="info" %}
Loco Translate is a plugin that allows you to translate your website's content into **one language at a time**, making it useful for **single-language** sites. It can **not** create **multilingual** websites!

Use [**WPML**](https://docs.stylemixthemes.com/masterstudy-lms/wpml) or [**Polylang**](https://docs.stylemixthemes.com/masterstudy-lms/additional-features/polylang-integration) to create **multilingual websites**. MasterStudy is **fully compatible** with both plugins.
{% endhint %}

## Install Loco Translate

Loco Translate is a **free plugin** that can be installed from WordPress's default repository.

1. In the WordPress dashboard go to **Plugins>Add New Plugin**:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FwU6gGL3MXnLFKvOToDkm%2Fadd%20new.jfif?alt=media&#x26;token=45d8eb35-e704-4db2-9a5e-afc20e8c560c" alt=""><figcaption><p>Adding New Plugin from WordPress Dashboard</p></figcaption></figure>

2. On the opened page, search for **Loco Translate**, then **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%2FxXpEVAtC8JPPlDxYg0DH%2Factivate.jfif?alt=media&#x26;token=cb4dd0be-8ba4-4131-a5a9-eff98cb1993a" alt=""><figcaption><p>Add Plugins page: Activating Loco Translate </p></figcaption></figure>

## Change The Website and WordPress Language

When you change the website and/or WordPress language, the MasterStudy interface (plugin's static strings) will also change, as long as it has been translated into your chosen language. &#x20;

> You can check the list of translated languages in MasterStudy LMS [here](https://wordpress.org/plugins/masterstudy-lms-learning-management-system/).

### Change the site Language

1. Open the general settings from the WordPress dashboard: **Settings >General**

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FAjkIffF12u69ChBN2PmY%2Fgeneral%20tab.jfif?alt=media&#x26;token=cf87b341-a140-43b7-ab17-961371f0592b" alt=""><figcaption><p>General tab of Website Settings</p></figcaption></figure>

2. Find the **Site Language** setting and select the language according to your needs:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2F19G0Ur9ixhbAABN3A6HM%2Flgg.jfif?alt=media&#x26;token=90a3af13-ae75-473e-bc10-f29d013a8019" alt=""><figcaption><p>Site Language setting in General Settings of WordPress</p></figcaption></figure>

3. **Save** the changes:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FNOP1wMzoUhmvPeFJDcmk%2Fsave%20gts.jfif?alt=media&#x26;token=f725bdb0-ed9f-4f92-badb-ee0a1cdb9816" alt=""><figcaption><p>Saving the changes</p></figcaption></figure>

### Change the WordPress (including plugins) Language

1. Go to **Edit Profile** on the upper-right corner:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FR7D5qkOJKFPxAqvSnOSL%2Fprofile.jfif?alt=media&#x26;token=befc1c1d-7c38-444c-a6d8-c8b79e6cca59" alt=""><figcaption><p>Editing Profile</p></figcaption></figure>

Alternatively, you can also follow WordPress **Dashboard > Users > Profile:**

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FC3A5ubb1eC4Vx9G1xsnC%2Fuser%20-%20profile.jfif?alt=media&#x26;token=faeb3adb-36a0-4bfc-8ff1-2083343f81ed" alt=""><figcaption><p>Editing Profile</p></figcaption></figure>

2. Find the **Language** setting then choose the one according to your needs:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FeVOqsJmnladIctVTBWSN%2Fprofile%20language.jfif?alt=media&#x26;token=9262975f-3591-4f35-a9cb-9a0e1488151b" alt=""><figcaption><p>Changing Language of the WordPress</p></figcaption></figure>

3. **Update** the profile settings:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FTbWYtkUvTJakOzAUtOaX%2Fupdate%20the%20profile.jfif?alt=media&#x26;token=08c8cec9-ff8a-460a-8f2d-9077b8a57a18" alt=""><figcaption><p>Updating the Profile changes</p></figcaption></figure>

## Create the Translation File

Before starting the translation, the translation file should be created.

1. Open the plugins page in Loco Translate by following **Loco Translate > Plugins** then choose **MasterStudy LMS:**

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2F6BXzoK7SKRslueJEp3CX%2FPlugin&#x27;s%20page.jfif?alt=media&#x26;token=904845ed-92f8-49e2-bd22-2864013f711a" alt=""><figcaption><p>Plugins page of Loco Translate</p></figcaption></figure>

{% hint style="info" %}
**Seperate** translation files should be created for **free and pro** versions of MasterStudy.
{% endhint %}

2. In the opened page click on **New Language**:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2F06FiyYCjiD0lP4BWv941%2Fnew%20language.jfif?alt=media&#x26;token=2bef2e78-082d-4281-8a48-64f31f719634" alt=""><figcaption><p>Creating New Language</p></figcaption></figure>

If you find the language you need in the list, you can freely edit it. There is no need to create it again:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2F6Atvu2t9yjnI6j7jy4aw%2Fedit%20lang.jfif?alt=media&#x26;token=298f4be8-d40e-45c8-ae95-53b4efff2cf4" alt=""><figcaption><p>Editing Existing Translation</p></figcaption></figure>

3. **Choose the language** and select the **last option** (languages/plugin/...) as the **location**:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FRi2XpOQPzg44xTY6K6A4%2Ftranslation%20new.jfif?alt=media&#x26;token=796adb34-cd84-486e-b96f-9e225ff0f766" alt=""><figcaption><p>Creating New Language</p></figcaption></figure>

After clicking the **Start Translation** button, you will be directed to the Loco Translate editor where you can start translating the plugin strings.

## Translation Process

The translation process is straightforward. Just write the translation to the designated area 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%2FiyJt36EduQmDqLEK0V3c%2Ftranslation%20editor.jfif?alt=media&#x26;token=ab09495e-d1d8-4305-8135-4e070a25e273" alt=""><figcaption><p>Example of the Translation process</p></figcaption></figure>

{% hint style="warning" %}
Some words may start with special symbols like **%s, %d, or \&ab** - these are variables. They can represent anything: a name, number, size, or date. You need to determine what they are from the context.&#x20;

Do NOT translate them. You can only change the order of them in the sentence.
{% endhint %}

For instance:

<table><thead><tr><th width="171"></th><th width="280">Source text </th><th>Translation (Korean)</th></tr></thead><tbody><tr><td>Loco Translate</td><td>%s commented - "%d" on lesson %m in the course %n</td><td>%s 님이 강좌 %n의 강의 %m에 대해 "%d"라고 댓글을 남겼습니다.</td></tr><tr><td>On the website</td><td>Jane commented - "Hi" on lesson Intro in the course MasterStudy Basics</td><td>Jane 님이 강좌 MasterStudy Basics의 강의 Intro에 대해 'Hi'라고 댓글을 남겼습니다</td></tr></tbody></table>

{% hint style="info" %}
If you cannot find some strings you want to translate in the free version of the plugin, try searching in the pro version.
{% endhint %}

### Example

Let's change the text inside the **'Preview this course**' button. We will change it to **'Preview LOCO'** just for testing.

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FcuxaWOhIdyvVIVoEMgJw%2Fpreview.jfif?alt=media&#x26;token=881cf942-dca6-4095-b48e-2b174704f18a" alt=""><figcaption><p>Preview this course button on the Courses Page</p></figcaption></figure>

1. Search for '**Preview this course**' and write '**Preview LOCO**' to the translation.

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2F2kuztvPsKEytsznKRdu7%2FPreview%20loco.jfif?alt=media&#x26;token=fb8bc202-97d0-454a-9156-8429bb972677" alt=""><figcaption><p>Translation example</p></figcaption></figure>

2. **Save** the changes:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FKx7PNkOlLyA0UkXVvEIo%2Fsave.jfif?alt=media&#x26;token=b13f1e56-5122-4b7c-b700-a8eb2dc69a1b" alt=""><figcaption><p>Always save the changes</p></figcaption></figure>

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%2Ftlj2ek7DfMoxzdiGIZSP%2Fresult.jfif?alt=media&#x26;token=da24abc3-650a-423a-9fda-bb62a446514c" alt=""><figcaption><p>The result</p></figcaption></figure>

## Update Translation File

Stylemixthemes cares about its clients, so we continuously add new and colorful features to our plugins to improve them. That's why it's important to keep your plugins up to date. During updates, new strings will be added or removed. After updating the plugin, you also need to synchronize it in the Loco Translate plugin.

1. **Edit** the language (translation file) that you are using:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FQhu36LDGaDVzUZazJIq5%2Fupdate.jfif?alt=media&#x26;token=c2f46025-9dfb-4988-a829-79d405780642" alt=""><figcaption><p>MasterStudy Free plugin page in Loco Translate</p></figcaption></figure>

{% hint style="danger" %}
Do NOT touch the 'Edit Template' button on this page. It may cause you to lose your translations.
{% endhint %}

2. Click on the **Sync** button and **Save** the changes. You can see what kind of changes were made:

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FwjAauR48jPzUvL8KDKKP%2Fafsfasfas.jfif?alt=media&#x26;token=7af36a3d-a3af-4d8a-a193-9c9639c608a5" alt=""><figcaption><p>Synchronizing new strings</p></figcaption></figure>

<figure><img src="https://691205473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTL6WUldKvxQaP8jzz%2Fuploads%2FGMXezHrAe5KEqTjTh5zY%2Flaaaaaast.jfif?alt=media&#x26;token=71015127-bbb6-4ecb-9b0b-5a17baf8b83d" alt=""><figcaption><p>Info message shows what changes were made</p></figcaption></figure>
