[Resolved] translate before and after elementor fields
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're using Elementor with WPML and have dynamic fields set up using JetEngine, you might encounter an issue where the 'Before' and 'After' text around the dynamic field does not translate when switching languages. This problem arises because the Before/After data structure is nested and challenging to translate in the Advanced Translation Editor or display correctly on the frontend. Solution: We recommend updating to WPML Version 4.9.0-b.1 to resolve this issue. Here are the steps to follow: 1. Download WPML 4.9.0-b.1 from the WPML Download Archive. 2. Install and activate the new version on your site, ensuring you back up your site first. 3. Trigger a translation update by making a minor change to the page title in the default language and saving the page. 4. Update the translation when prompted, ensuring the Before/After text fields are available for translation and translate them. 5. Verify the translations on the frontend to ensure they display correctly.
If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
I am using Elementor and the WPML for translations. I'm using a custom fields from JetEngine where it's a language, and when I click a single post, I'm populating that text from dynamic fields, and Elementor gives me the option to put some text before or after that dynamic field. How can I translate that on the WPML? I can't understand it.
example:
You have:
A custom field (for example, language) that holds some text.
In Elementor, you add a Dynamic Field widget to show that custom field.
Elementor lets you add “Before” or “After” text around the dynamic field.
Example:
Dynamic field: English
Before: Language:
After: is spoken here
Output: Language: English is spoken here
The issue: When you switch the site to another language using WPML, the dynamic field value will change if it’s translated, but the text you put in the Before/After fields in Elementor will not automatically translate.
When I edit the template link that you sent (hidden link) I am not able to edit those language sections. It's like it's greyed out. Are these language icons inserted into this template from another template or a global widget? I need to determine where it is actually created so that we can translate it there.
I'm Prosenjit from the WPML Development Team, and I'll be happy to help you resolve this issue.
I've thoroughly reviewed the entire conversation and completely understand the problem you've been experiencing. I apologize for any inconvenience this has caused.
I checked our internal bug tracking system and can confirm that this is a known compatibility issue related to translating dynamic fields in Elementor. The Before/After data structure is quite nested, which makes it challenging to translate the Before/After values in the Advanced Translation Editor or see them properly translated on the frontend.
I was able to replicate the issue locally using WPML 4.8.6 by following the exact steps you demonstrated in your video.
However, we've been working on resolving this compatibility issue, and I'm happy to let you know that the fix has been included in WPML Version 4.9.0-b.1.
I've tested this version locally and can confirm that:
- The Before/After text now appears correctly in the translation editor
- You can translate these fields successfully
- The translations display properly on the frontend
I've attached screenshots showing this working correctly.
Please follow these steps to resolve the issue on your site:
2. Install and activate the new version on your site. Make sure to take a backup of the site.
3. Trigger translation update:
- Open the default language page in the WordPress editor
- Make a small change to the page title (this is just to trigger the update)
- Save the page
4. Update the translation:
- You should see a translation update prompt
- Proceed to update the translation
- You should now see the Before/After text fields available for translation
- Translate them
5. Verify on frontend:
- Check the translated page on the frontend
- The Before/After translations should now display correctly
Please try this updated version and let me know how it goes. I'm confident this will resolve the issue, but I'm here to provide further assistance if you encounter any difficulties during the update process or if you have any questions.