This thread is resolved. Here is a description of the problem and solution.
Problem: The client is trying to translate the text of the Divi Image Hover plugin using WPML but is concerned about entering code in the Custom XML Configuration and potentially breaking their site. They are using a basic child theme and cannot use the Multilingual Tools plugin. The main issue is that the Spanish professions displayed on the images are not translatable into English. Solution: We recommend following the steps provided by our colleague in a previous support ticket, which involves adding specific XML code to the WPML → Settings → Custom XML Configuration. You can find the necessary instructions and XML code here: https://wpml.org/forums/topic/the-divi-image-hover-text-is-not-acknowledged-by-your-plugin/#post-13394257. Before implementing this on your live site, please try it on a staging site and ensure you have a backup. Additionally, make a minor edit to the page where the Image Hover element is used and update it to trigger the translation process in WPML's Translation Editor. Another critical step is to ensure that the WordPress REST API is enabled on your site, as it is necessary for loading strings. You can verify this in WPML → Support. If it's disabled, please contact your hosting provider or developer to enable it. More information on this can be found here: https://wpml.org/documentation/support/rest-api-dependencies/.
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.
Symptoms:
The images on the page hidden link have Spanish professions that are not translatable into English.
Questions:
How should I fill in the src__hover in the Custom XML Configuration?
What should I put in "media-url" or "src_hover" specific to my website?
Is it correct that there is nothing to replace in WPML → Settings → Custom XML Configuration?
Do I need to add another custom-type in the XML code for my child-theme?
Hi, I've had no luck with my site. I inserted the code in Custom XML Configuration tab with and without <custom-type> for child theme, but although I find the string is only for backend module and no for the words I need to translate. Still I can't find the way for to translate.
To make things clear, you should see the Divi Image Hover test when you translate the page where you have an Image Hover element. The example you gave was for this page.
hidden link
So after adding the XML code in WPML -> Settings -> Custom XML Configuration, you should make a smal change to the above page. You can add space or a dot. Then you need to press the Update button. This will trigger a change also for the translation and icon will change from the pencil icon to the circled arrow icon. Then clcik to edit the English transaltion and you hsould see the text of the Image Hover in WPML's Translation Editor.
Did you try this?
Another important thing I just notcied is that WordPress REST API is disabled on your site. It should be anabled for strings to be loaded. You should see it is dosabled with you go to WPML -> Support. There look for "REST enabled" and see that it is set to "no". Please read more about this in the following link:
Thank you very much! It works now! I think I wasn't enabling the full translation by making any changes to the text. Thanks for pointing that out.
Now, the only problem is that the English translation is displayed in some places with the <p> and </p> tags. How can I hide them?
I hope it's not a complex problem.
Regarding the limitations of the REST API, I've read that WPML can display a false positive and that the check is done by searching the /wp-json/ file. If api-rest is present anywhere in the code, it's enabled, which is the default setting. This way, I think the REST API shouldn't have any problems.
I can see the problem with the <p> tags when hovering over the images. The problem is shown in some of the images but not in all of them.
If the <p> tag shows on WPML's Translation Editor on the English side, then simply remove it from there. If it does not show, please give me access to your site to check things further.
If you need further help with this, please share the access details to your site with me. I'm enabling a private message for the following reply. Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ **IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--
Yes! It's resolved! But what could have happened? Or how did you resolve it? I'll use the plugin on another page as well, and I don't know if it will happen again. Thank you so much for your help.
Step 1, that I mentioned, didn't correct the problem. It was corrected after step 2. I can't know why it happened. However, I suspect it was because the translation process was incorrectly followed. In any case, it is fixed now. Thanks for confirming it.