# Supported Languages

Product Rentals Pro automatically translates to the following languages:

* English
* Danish
* Dutch
* French
* German
* Greek
* Icelandic
* Italian
* Japanese
* Polish
* Spanish
* Turkish

The app will automatically update text such as warning messages, button texts and more.

Other texts are configurable by you, so you can set them in the language you require. This includes things such as variant names, delivery method names, start and end date labels and text blocks above and below the calendar. These are either set in the PRP Admin (Settings > [Rental Settings](https://docs.productrentalspro.com/user-guide/settings/rental-settings)) or in the Theme Customizer (select the PRP Rental Widget to see the [configuration options](https://docs.productrentalspro.com/user-guide/rental-widget/rental-widget-configuration-options) available).

{% hint style="success" %}
**If you require a language not listed above**, please [let us know](https://tally.so/r/mVlWGy)! We can usually add new languages quite easily and we should be able to deploy it to the live app within a couple of days!
{% endhint %}

### **Require Multiple Languages?**

Need your site to operate in multiple languages, not just your base language?

The standard text and booking calendar of the PRP rental widget will automatically translate when your site is set, or switched, to a particular language - provided it is one of the supported languages listed above.

Some other text is configured by you, such as the text above and below the calendar for each delivery method. These are configuration options of the PRP rental widget. There's a bit of effort required to make your own text translatable when the language is switched on your website.

The basic steps are:

* create a new metaobject on your store, add an entry, and set the values
* set up translations for each of the values
* reference the metaobject in the PRP rental widget app block settings

{% hint style="warning" %}
PRP doesn't support **Automated Translate & Adapt** by Shopify. Shopify runs this process each site individually and the results can be unpredictable. At times, it has resulted in Shopify translating some javascript code that is not intended for public display, in turn breaking features of the PRP rental widget. To translate widget text to multiple languages, use the process described below.
{% endhint %}

{% hint style="warning" %}
Note that currently there is some text displayed within the widget that cannot work with multiple languages - such as the **Rental Start Date label** and the **Rental End Date label**. These are configured by you in the PRP > Settings > Rental Settings screen. Their values on your website must match what you've entered within the settings screen, otherwise a rental won't be created in PRP when the order is completed.
{% endhint %}

#### Creating the metaobject and entry

1. Go to *Shopify Settings > Metafields and Metaobjects > Metaobject Definitions*, and click **Add Definition.**&#x20;
2. Give the new metaobject defintion a name of *prp\_widget\_text* or something similar.
3. In the *Fields* list, add a new one for each configuration field you want to include different text depending on the language. For example:\
   \- name (include this just to give the entry a name)\
   \- text\_above\_calendar\_post\
   \- text\_below\_calendar\_post\
   \- text\_above\_calendar\_pickup\
   \- text\_below\_calendar\_pickup\
   etc
4. Make the settings of each **One value** and field type **Single-line Text**
5. Ensure **Translations** is on in the *Metaobject options* below
6. **Save** the Metaobject defintion
7. Click **Add Entry** at the top of screen
8. Enter the values for each of the fields in your base/primary language. Put "main" in the *name* field.
9. **Save**

#### **Setting up translations for each of the entry values**

1. Whilst viewing the metaobject entry, click **More Actions** at the top of screen and select **Localize**
2. Now you can enter the equivalent text in each of the languages you have activated in Shopify. You can toggle between languages with the control at the top. E.g. *Translating \[language] v*<br>

   <figure><img src="https://234434261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmpQXZYRz6niON4PyVhfO%2Fuploads%2FJSPlrAzGltLKGSnBPGhD%2Fimage.png?alt=media&#x26;token=bbdf5706-8a65-438b-bcea-16db20557555" alt=""><figcaption></figcaption></figure>
3. Once all translations have been entered, **Save**.

#### Reference the metaobject entry in the PRP rental widget settings

1. Go to the **Theme Customizer** and navigate to your product page template used for rentals
2. Select the *PRP Rental Widget* within the template. The configuration options of the widget will appear in the left or right column.
3. Go to the field you want to support translation for, such as "*Text above calendar - post*"
4. Click the *Connect dynamic source* button at the top right of the field:\
   ![](https://234434261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmpQXZYRz6niON4PyVhfO%2Fuploads%2FihG72FNjsKp6B40Pvpwm%2Fimage.png?alt=media\&token=88578483-d8a7-40a9-9abd-b44b3dc4234e)
5. Go to *Metaobjects > prp\_widget\_text > Main* and select the field you want to use. You might need to click back on the popup to get back to Metaobjects.\
   ![](https://234434261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmpQXZYRz6niON4PyVhfO%2Fuploads%2FGNC8v4CXzGo4k4rGV1eY%2Fimage.png?alt=media\&token=c3edc21f-4db4-4e05-8c2a-2a2c36c4403b)
6. The dynamic text gets placed into the PRP Rental Widget configuration field.\
   ![](https://234434261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmpQXZYRz6niON4PyVhfO%2Fuploads%2FedmthLwcVn1umqOR2fnV%2Fimage.png?alt=media\&token=637b3c86-ec94-4a31-b7ed-9eb408d62848)
7. **Save** the template.

Now when you use the language switcher on your website, the text will appear according to the translations you set up in the previous step!

#### Reference the metaobject entry with Liquid code

If the field you want to enter the value into doesn't have the *Connect Dynamic Source* button, you can use liquid code. For example, in the Custom CSS box.

In some cases you may want to use the `::after` pseudo selector to place some text somewhere into the rental widget or page, via the `content` property. You could reference the shop metaobject within the CSS code, like so:

```css
.rw-submit::after {
    content: "{{ metaobjects.prp_widget_text.main.text_after_button.value }}";
}
```
