During work with the store you can install different apps, that increase its functionality. These apps can create some additional dynamic content on the pages. For example, it can be chats, banners, modal windows, counters, etc. With the help of LangShop, you can translate such content. The functionality of dynamic content translation allows LangShop to understand where to search for dynamic content, what to search, and how to replace it with the translated content.
For example, we've installed the Products Reviews app to our demo store. It's a popular Shopify app that allows adding customer review feature to the store. In the pic below you can see an example of a preview section.
Creating the customer preview section the app adds a dynamic text like 'customer review', 'write a review' to the store.
Find dynamic content
To do it, follow this instruction:
- Go to the Online Store section of the store and choose the Themes section.
- Click Localization and select Dynamic text. Here you will see the list of the translated dynamic content.
- Click Add new to create a new translation of the dynamic content. You will see fields where you should enter the original text, previous, and next characters. Let's consider this step closer.
'Original text' is the text that you want to translate. 'Previous char' and 'Next char' fields are intended to specify where the text is located in your store page markup. It is needed to narrow the search area and avoid unnecessary replacements.
Note: To find text location in the page markup you can use browser's Developer Console. So, go to the page where you want to translate the text, right-click on it and choose Inspect. In the appeared page console find the needed text and check between what symbols it is placed. Usually, it's HTML tags and you should to type '>' and '<' symbols in the previous and next char fields.
- For example, you have a dynamic element (like the reviews block) that appears on different pages in the store and you want to translate it only on the appropriate pages. Choose templates where you want to search the dynamic content. Click Edit and select templates.
- Click Done and Save.
Translate dynamic content
After saving you will see language tabs above your dynamic text.
To translate the content follow the guide:
Translate into all target languages
If you want to translate the content into all target languages, click Auto translate and choose languages into which you want to translate the content.
Translate into one target language
- Choose the necessary language tab.
- Click Auto translate and wait for the translation.
- Click Save.
A priority of the translation
LangShop sets a priority for the translated dynamic content. The longer a phrase, the higher priority it has.
For example, we have two dynamic texts: 'review' and 'customer review'. First of all, LangShop will translate 'customer review' and then 'review'.