Background of the issue:
I am trying to translate a dynamic tag named 'Product Sale' that I assigned to an Elementor text widget. This tag has a text value that should display when a product is on sale. Currently, WPML does not allow me to translate this message.
Symptoms:
Instead of seeing a translation or a new field to input another value, I only see the original text.
Questions:
How can I translate the dynamic tag 'Product Sale' in Elementor using WPML?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
My apologies, as I was a little too fast with my reply.
I hope you have not yet made this change, as I was not expecting that you would use the Classic Translation Editor.
If you switch to the Advanced Translation Editor, you will need to redo the translations, as it is not possible to keep translations from the Classic Translation Editor inside the Advanced Translation Editor.
It is sadly only possible to switch from the Advanced Translation Editor back to the Classic Translation Editor, without losing translations.
I created a test site today with Elementor PRO, WooCommerce, and WPML, and I was able to confirm that this field is not yet translatable.
To make the field translatable, please add the following markup at WPML > Settings > on the tab "Custom XML Configuration":
After that, edit the widget in Elementor on the original content, save the page, and then open the translation editor. This should work with the Classic Translation Editor or the Advanced Translation Editor.
The only problem here is that on ATE, you might still need to search the text, and on both editors, the text will appear this way:
%7B%22text%22%3A%22Sale!%20Foo%20Bar%22%7D
This string is a URL-encoded JSON object. When decoded, it becomes:
{"text":"Sale! Foo Bar"}
This means that Elementor is, in this case, not only sending the raw text. This is kind of a known issue for which we do not yet have a general solution.
Workaround:
Edit the text on the translation directly inside Elementor.