[Resolved] Advanced Translator Editor disrupts the html code
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with HTML code being disrupted when using the Advanced Translation Editor in WPML to modify translations within Elementor. Solution: We recommend using the text search field located at the top left of the WPML Translation Editor to translate all CSS and, in this case, also a couple of JavaScript functions. This approach has resolved the issue for the client on their test site. Guide: https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/#main-features-of-the-advanced-translation-editor Please note that this solution may not be relevant if it's outdated or not applicable to your specific case. If you're still encountering problems, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please do not hesitate to open a new support ticket with us.
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.
We are using html code in Elementor. WPML doesn't seem to deal well with it. We already have a ticket open in that regard. But we discovered another issue:
Whenever I use the Advanced Translator Editor, even to modify one word, it disrupts the html code. Just doing one change in one language, wiped out the code.
I used the same theme, Elementor and recreated one page in English and German.
I used the html block in Elementor, inserted the html code for the English. I used WPML to insert the German translation.
I copied the code that we installed for the German html page (so that error messages would be in German).
I made an edit using WPML in the German text, saved it to translation memory and clicked on complete.
I looked at the German page in Elementor and saw that after I made the change in German, the html code reverted to the English version.
When you work in WPML, does it automatically revert the whole page to what was saved in the translation memory, even if only one word was edited in it? That could explain why the English code always replaces the German code in Elementor.
I hope you're able to figure out a solution using this sandbox version.
We determined that after all the pages are translated in one language, we'll do any edits in Elementor only, without going back to WPML.
I look forward to the results of your investigation.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello Daniela,
The Advanced Translation Editor is a CAT Tool that is designed for pure text translation for human translators and automatic translation engines.
You would need to use the text search field on the top left of the WPML Translation Editor and translate all CSS and, in this case, also a couple of JavaScript functions.
See screenshots.
This seems to have solved the issue in this case. See the test site.
That does explain it. We'll make sure to save them in the translation memory correctly.
Would you be able, though to give us specific answers to these slightly separate, but similar questions that were asked in previous tickets but for which we haven't reached proper answers.
1) Some pages, particularly pages that were translated into French changed their status from completed to the gear symbol, despite not having done anything to those pages.
When opening them in the Advanced translation editor, some segments were missing. I reported this at thte time, so probably there isn't a log that can show this any longer, but it is unsettling that the page would do that.
2) It was explained in the past that if text was already translated, clicking on the button to do the automatic translation, it should call the text from the translation memory. This didn't seem to be the case when # 1) happened. Credits were deducted and a DeepL translation replaced the previous translation that had already been reviewed.
3) In a previous ticket, you explained that to apply italics to words that were not italics in the source language, one would have to apply it outside of WPML, using Elementor in this case.
I understand that this may disconnect things a bit. but what is puzzling is that if I open the page in the Advanced Translator Editor without making any change, simply opening the page, all the applied italics disappears. The page was not updated, nothing and yet opening WPML has that effect. I will adjust the setting so that it doesn't publish pages right away, but I do need to know for sure if the text gets updated the moment the translator editor is opened, without making any changes.
Thank you for looking into these additional questions.
I was finally able to get back to this ticket and I tried to recreate a page in German and French in the Sandbox.
I wasn't able to search for the language text in the html code, the error messages that only appear if one forgets to type some required information.
I pasted English into the translation, thingking that the English text in the translator editor would be replaced by the language version in the code, but that's also not the case. So the translation editor has English text and the page has German or French, depending on the selected language.
Does this give you something to work with, or do you need me to place the translated version in the language editor to make your determinations?
I looked more into this, and the translation pages cannot be duplicated unless you're creating a new translation. How do I switch to the manual translation of the content when the page already exist and I only want to prevent WPML from overwriting the content?