How to translate dynamic content?
In this article, you'll find out how to translate dynamic content.
First of all, note that this feature is currently not available on WordPress
What is Dynamic Content?
Dynamic content on a website refers to elements that change based on user interaction or real-time updates. Examples of dynamic content include user-generated comments, real-time stock updates, or personalized greetings. Translating dynamic content can be a bit tricky, but this guide will simplify the process for you.
Steps to Translate Dynamic Content with Weglot
Access the Web Inspector: Navigate to the webpage you want to translate. Right-click on the page to reveal a menu and select "Inspect" to open the web inspector panel.
Identify the Dynamic Element: In the inspector panel, use the selector tool to hover over the area that isn't being translated. This will highlight the element.
Find the Class or ID: Once the element is highlighted, look for its .class or #ID in the inspector panel.
Update Weglot Settings: Head over to your Weglot Dashboard. Then, under Settings, navigate to App Settings.
To add the dynamic content you'd like to translate, click the "Add Dynamic" button. This will open up the "Add Dynamic Element" box, where you can input the specific .class or #ID associated with the content.
- Prefix a class name with a period (.) and an ID with a hashtag (#).
- You can also add a description to remember what the added selector translates.
5. Save and Refresh: Click on "Save". You might need to clear your browser cache and refresh the page to see the translated content.
If you have any thoughts or questions about this guide, let us know! We'd love to hear from you.