Skip Navigation

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.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by williamV-12 9 months, 2 weeks ago.

Assisted by: Andreas W..

Author Posts
February 27, 2024 at 4:34 pm #15350175

williamV-12

Hello,

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.

Can you help look into this?

February 27, 2024 at 6:01 pm #15350644

williamV-12

I was able to recreate the issue, it looks like.

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.

Daniela

Screenshot 2024-02-27 at 18.43.17.png
Screenshot 2024-02-27 at 18.42.36.png
February 27, 2024 at 10:33 pm #15351530

Andreas W.
Supporter

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.

Best regards
Andreas

Captura de pantalla 2024-02-27 173034.png
February 28, 2024 at 4:47 pm #15355122

williamV-12

Hi Andreas,

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.

Daniela

February 28, 2024 at 10:41 pm #15356011

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Please recreate the issue on the following test site by creating a page with your content and I will take a look into this:

One-Click-Login:
hidden link

Leave me a comment on this ticket once you have completed this task.

March 2, 2024 at 1:07 pm #15365718

williamV-12

Hi Andreas,

Just a quick note that since recreating the website is quite a time consuming endeavor, it will take me some time to get back to you.

Thanks,

Daniela

March 2, 2024 at 2:51 pm #15365807

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

You do not need to recreate the whole website.

Please only create a page with Elementor, add an HTML Widget, and paste your code example into it.

Let me know once you are done with this task.

March 5, 2024 at 4:36 pm #15375645

williamV-12

Hi Andreas,

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?

Thanks!
Daniela

March 5, 2024 at 5:14 pm #15375803

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Thank you for our chat today and I hope it clarifies the issue.

If you do not need further assistance with the ticket, please mark it as resolved: https://wpml.org/forums/topic/advanced-translator-editor-disrupts-the-html-code/

March 12, 2024 at 2:44 pm #15400120

williamV-12

"Andreas W. : Then you need to translate manually with the WordPress Editor and disable the WPML Translation Editor for this content.
Andreas W. : Guide: https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/"

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?

Thanks!
Daniela