# Translating Static Strings

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://wpml.org/)  or other related plugins to create **multilingual websites**.
{% 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://docs.stylemixthemes.com/~gitbook/image?url=https%3A%2F%2F691205473-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MDTL6WUldKvxQaP8jzz%252Fuploads%252FwU6gGL3MXnLFKvOToDkm%252Fadd%2520new.jfif%3Falt%3Dmedia%26token%3D45d8eb35-e704-4db2-9a5e-afc20e8c560c&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=1ef439a2d83e6f89dcb2638d7742b78f82d19108b18d2565442c30e68a30c959" 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://docs.stylemixthemes.com/~gitbook/image?url=https%3A%2F%2F691205473-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MDTL6WUldKvxQaP8jzz%252Fuploads%252FxXpEVAtC8JPPlDxYg0DH%252Factivate.jfif%3Falt%3Dmedia%26token%3Dcb4dd0be-8ba4-4131-a5a9-eff98cb1993a&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=d5f4bd15aef10c6d1b563bea8ef0e7c193893ac54e2b14dd3fcfaa22f2764aa1" alt=""><figcaption><p>Installing Loco Translate</p></figcaption></figure>

## Change The Website and WordPress Language <a href="#change-the-website-and-wordpress-language" id="change-the-website-and-wordpress-language"></a>

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

### Change the site Language

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

<figure><img src="https://docs.stylemixthemes.com/~gitbook/image?url=https%3A%2F%2F691205473-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MDTL6WUldKvxQaP8jzz%252Fuploads%252FAjkIffF12u69ChBN2PmY%252Fgeneral%2520tab.jfif%3Falt%3Dmedia%26token%3Dcf87b341-a140-43b7-ab17-961371f0592b&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=1a4e5412198b66244843eeda1ade0fa21e4e56ed435e82aad78d20aae1ae8834" alt=""><figcaption><p>General tab of the WordPress Settings</p></figcaption></figure>

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

<figure><img src="https://docs.stylemixthemes.com/~gitbook/image?url=https%3A%2F%2F691205473-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MDTL6WUldKvxQaP8jzz%252Fuploads%252F19G0Ur9ixhbAABN3A6HM%252Flgg.jfif%3Falt%3Dmedia%26token%3D90a3af13-ae75-473e-bc10-f29d013a8019&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=8c7f006ef8b9120c0167d2da8f74b53c114dd77e220faa228e1f1c5a2c5eaab2" alt=""><figcaption><p>Site Language setting in the General Settings of the website</p></figcaption></figure>

3. **Save** the changes:

<figure><img src="https://docs.stylemixthemes.com/~gitbook/image?url=https%3A%2F%2F691205473-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MDTL6WUldKvxQaP8jzz%252Fuploads%252FNOP1wMzoUhmvPeFJDcmk%252Fsave%2520gts.jfif%3Falt%3Dmedia%26token%3Df725bdb0-ed9f-4f92-badb-ee0a1cdb9816&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=b6a9e90ea83f03ccc0f0aef078cc346eb74292b59ed24502797c0a17625ca8c6" alt=""><figcaption><p>Saving the changes</p></figcaption></figure>

### Change the WordPress (including plugins) Language <a href="#change-the-wordpress-including-plugins-language" id="change-the-wordpress-including-plugins-language"></a>

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

<figure><img src="https://docs.stylemixthemes.com/~gitbook/image?url=https%3A%2F%2F691205473-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MDTL6WUldKvxQaP8jzz%252Fuploads%252FR7D5qkOJKFPxAqvSnOSL%252Fprofile.jfif%3Falt%3Dmedia%26token%3Dbefc1c1d-7c38-444c-a6d8-c8b79e6cca59&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=371ed467ec35cb67018c3dc1692fe46cf0729f88e6d533a69359888f142f70f2" alt=""><figcaption><p>Editing Profile</p></figcaption></figure>

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

<figure><img src="https://docs.stylemixthemes.com/~gitbook/image?url=https%3A%2F%2F691205473-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MDTL6WUldKvxQaP8jzz%252Fuploads%252FC3A5ubb1eC4Vx9G1xsnC%252Fuser%2520-%2520profile.jfif%3Falt%3Dmedia%26token%3Dfaeb3adb-36a0-4bfc-8ff1-2083343f81ed&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=9fc37f680b75c7dcd8bdc34d2affb69773cdd6e4d13c43fa12f2a67ad2477694" alt=""><figcaption><p>Editing Profile</p></figcaption></figure>

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

<figure><img src="/files/v9x5xkaLQjD9Cuy022J4" alt=""><figcaption><p>Profile Language</p></figcaption></figure>

3. **Update** the profile settings:

<figure><img src="/files/IqUeyuXT0l8iWG4NLFFI" alt=""><figcaption><p>Update Profile</p></figcaption></figure>

## Creating the Translation File

1. Open the plugins page in Loco Translate by following **Loco Translate > Plugins** then choose **Motors - Car Dealer, CLassfieds & Listings:**

<figure><img src="/files/iLtZBNv7NJ6vczHst3D1" alt=""><figcaption><p>Plugins Page of the Loco Translate</p></figcaption></figure>

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

<figure><img src="/files/w62kFbXdziYPMWHzwrKs" alt=""><figcaption><p>Creating New Language</p></figcaption></figure>

{% hint style="success" %}
If you find the language you need in the list, you can freely edit it. There is no need to create it again.
{% endhint %}

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

<figure><img src="/files/NC5XIkMzaNshD7m6HclD" alt=""><figcaption><p>Creating a 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="/files/ZnA2IyiOCY2V4f0Nt4si" alt=""><figcaption><p>Main Translation Page of the Loco Translate</p></figcaption></figure>

{% hint style="info" %}
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.

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="269">Source text</th><th>Translation (Spanish)</th></tr></thead><tbody><tr><td><strong>Loco Translate</strong></td><td><strong>%s</strong> commented - "<strong>%d</strong>" on listing <strong>%m</strong></td><td><strong>%s</strong> comentó - "<strong>%d</strong>" en el listado <strong>%m</strong></td></tr><tr><td><strong>On the website</strong></td><td>Jane commented - "<strong>Nice car</strong>" on listing <strong>BMW X7</strong></td><td>Jane comentó - "<strong>Nice Car</strong>" en el listado <strong>BMW X7</strong></td></tr></tbody></table>

### Example

Let's change the text inside the '**TRADE IN FORM**' button. We will change it to **'TRADE IN (LOCO)'** just for testing.

<figure><img src="/files/Gzl04Ip6d4kknfQClY9h" alt=""><figcaption><p>Trade in Form button in the Single Listing Page</p></figcaption></figure>

1. Search for '**Trade in form**' and write '**Trade in (LOCO)**' to the translation and save the changes:

<figure><img src="/files/raBltta1jAENSsRdiFkF" alt=""><figcaption><p>Translating Trade in Form text</p></figcaption></figure>

Here is the result:

<figure><img src="/files/HSxNP8mwkacOqRJ7X1cI" alt=""><figcaption><p>Trade in Form button in the Single Listing Page after translation</p></figcaption></figure>

## Update Translation File <a href="#update-translation-file" id="update-translation-file"></a>

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. Follow **WP Dashboard -> Loco Translate -> Plugins -> Motors - Car Dealer, Classifieds & Dealership**  and click on the **Edit Template** button:

<figure><img src="/files/j7dYOFSMbVUjgyDX58au" alt=""><figcaption><p>Motors Plugin page in the Loco Translate Plugin</p></figcaption></figure>

2. Click on the **Sync** button to start synchronization:

<figure><img src="/files/aEmlaT6HEcadtNM3puFO" alt=""><figcaption><p>Synchronization</p></figcaption></figure>

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

<figure><img src="/files/4qYMz3giKs8xVzcqAlHp" alt=""><figcaption><p>Info message shows what changes were made, saving the changes</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stylemixthemes.com/motors-car-dealer-classifieds-and-listing/translating-plugin-into-a-different-language/translating-static-strings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
