Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 - -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 9 replies, has 2 voices.

Last updated by Noman 1 year ago.

Assisted by: Noman.

Author Posts
June 27, 2024 at 1:50 pm

jimeH

Background of the issue:
During the development of this site, we entered a bunch of translations for the post, pages, and templates from Elementor. Since then, some changes had to be made to certain translations. We have deleted old translations and replaced them with new translations. URL: hidden link

Symptoms:
When making changes to posts, pages, or templates where the translation has changed, old translations replace newer translations when updating them. This issue does not happen always but too often it does. In the hero section, the button 'Subsidieaanvraag starten' should direct to hidden link, but it redirects to hidden link. We have changed it many times in the string translations, but it resets back with certain updates.

Questions:
Do you know if this issue is familiar?
How can we fix it?
Can we have insight into the translation memory or edit the translation memory?
Is it possible to clear the translation memory and if so what are the consequences?

June 27, 2024 at 2:54 pm
June 27, 2024 at 2:56 pm #15844997

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I’ve noticed that the “Grant Scan” page was not available in secondary language that’s why you were facing this issue, so I’ve followed the below steps:

1. Duplicated the "Grant Scan" page into Dutch language to make the page available in secondary language.

2. Pressed the "Scan now and adjust links" button and it changes the button link automatically as you can see in the attached screenshots.

Could you please check and confirm?

Thank you

grantscan page not translated.jpg
Before.jpg
After scan.jpg
June 28, 2024 at 7:43 am #15850099

jimeH

It shouldn't go to that page. Each language has a different page it needs to direct to. Not a translation of the same page. Also the issue is bigger than this specific button. This is only an example of different translations that I could easily find. But it also happens to text fields and html fields where a shortcode is implemented. The annoying thing is that I have tried to fix most of these problems by keep translating them back to how they should be translated so I don't have another example at hand.

The problem is not with me not knowing how to translate. It lies deeper where the systems resets translations. It is also not instantly that they change back so I can see the right translations. But after making other updates to that same page or post, the translation resets.

I hope this is a better explanation of the problem we are facing and I hope you can look into this. Again, from the forum, the following issue is relatable with the problem we are experiencing: https://wpml.org/forums/topic/reset-translation-memory-category-synchronization/. Please check this item for more context.

June 30, 2024 at 9:37 am #15861919

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sorry for the delay, I was off during the weekend (Friday-Saturday).

1. Regarding the button translation, If it should not go to the translation of same page automatically, in this case, please try to follow the below steps:
1.1. Add the below XML:

<wpml-config>
  <elementor-widgets>
    <widget name="button">
      <fields>
        <field type="Button Text" editor_type="LINE">text</field>
        <field type="Button URL" editor_type="LINE" key_of="link">url</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

In WPML >> Settings > Custom XML Configuration section.
1.2. Make a small change in the default language page to reload the translation.
1.3. Open the translated page in WPML Advanced Translation Editor, search for your button URL and add the translation.
1.4. Clear all sorts of cache and see if this resolves the button translation issue.

2. Usually, the system resets translations if you use the WPML Advanced Translation Editor (ATE) and then update translations using the default WordPress Editor or the WPML String Translation page. When you try to update the translation again using ATE, it removes any changes made with the default WordPress Editor or String Translation because ATE uses translation memory. Changes made outside of ATE don't get saved in this memory, so ATE loads the old translation.

Here is a doc for more details: https://wpml.org/faq/why-arent-my-translations-showing/

2.1. To avoid this issue, please continue using WPML Advanced Translation Editor for all translations, in case, if you want to use default WordPress Editor then, please first disable the WPML Translation Editor for that particular page by following this doc: https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

2.2. If the issue persists, please provide step-by-step instructions to replicate it so we can debug further.

Thank you for your cooperation and patience

July 2, 2024 at 12:38 pm #15875220
jimeH

Hi and thanks for your response.

I have been testing the solution you have provided and with the XML code added I can find the url's of the links via the Advanced translation Editor. For now it als seems to fix the issue so I hope this will be the final fix and the translations are permanent.

However I have the same problem for the GravityForms shortcodes. I have already tried this guide before to help with translating the shortcodes: https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/. They only show up in the string translations and not in the ATE. I have uploaded an image of the XML code we currently use on the site. Maybe you can take a look and see if there is something missing. We have also implemented the following inside the functions.php: https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#making-id-attributes-translatable

Finally I want to share with you a screenshot of the revision log where you can see that changes are being made without a user. We suspect these changes come from WPML. Hopefully this helps with understanding the problem even better and gives you new insight on how we can solve this.

New threads created by Noman and linked to this one are listed below:

https://wpml.org/forums/topic/gravityforms-shortcode-translation/

Scherm­afbeelding 2024-07-02 om 14.33.23.png
Scherm­afbeelding 2024-07-02 om 14.26.49.png
July 2, 2024 at 3:22 pm #15876542

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

1. I'm glad to hear you're able to translate the Elementor button URLs using the Advanced Translation Editor (ATE). I hope this resolves the issue permanently.

2. Regarding the GravityForms shortcode translation issue, I've created a new support ticket:https://wpml.org/forums/topic/gravityforms-shortcode-translation/ to handle this separately as per our support policy. This will allow us to focus specifically on debugging this problem.

3. Thanks for sharing the screenshots. WPML only translates pages automatically if the "Translate Everything Automatically" option is enabled in WPML >> Settings >> Translation Mode. Otherwise, it does not make changes without user intervention.

Please let us know if the translation overwrite issue occurs again if you only use ATE, and we will investigate further.

Thank you for your cooperation

July 2, 2024 at 8:11 pm #15878000

jimeH

Thanks for reaching back to us,

Concerning the translation of pages, this is not done via the "Translate Everything Automatically" option. During our own further research into the problem we have discovered that the translations made without a user have the following id: user_id=0. Can we somehow exclude te possibility that this is WPML that is causing these changes without the interference of the user? It would be useful if we could discuss this via chat to get quicker to a solution. Please let me know if this is a possibility.

July 3, 2024 at 3:55 pm #15885815

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the additional details. That’s a bit strange. You can confirm it by updating the default language posts/pages and WPML will not update the translated page automatically if the “Translate What You Choose” option is selected from WPML >> Settings > Translation mode section.

If you prefer discussing this via chat, please feel free to create a new chat anytime with the reference of current ticket link: https://wpml.org/forums/topic/translation-memory-keeps-resetting-translations/ and we will be more than happy to help.

Thank you

July 4, 2024 at 12:23 pm #15891769

jimeH

Thank you for your response.

I have verified that the translation mode is set to "Translate What You Choose," and this is indeed the case.

During our investigation, we deleted all string translations and removed all translations according to the instructions in this thread: https://wpml.org/forums/topic/delete-translation-memory/#post-7514523. We performed this in a staging environment.

When attempting to edit a translation, all the fields in ATE are empty. However, on the frontend, the pages are still displayed correctly in translation. This is confusing because there should be no translations of these pages/templates.

We tested translating a template and observed changes in the translation from before and after our translation process. However, we noticed that the form at the end of the page was not translated. Since we couldn't find the form in ATE, we checked the String Translations. Here we discovered that for this specific template, multiple translations were made because we started the translation with ATE. These translations include the shortcode that needs to be translated. However, the shortcode translation is just a copy of the original language.

The system should not be able to translate strings by itself. You have previously indicated that this should not happen if we use the "Translate What You Choose" option.

We do not want to change the string translation of the shortcode yet, as this could interfere with our current investigation into this issue. Could you explain why strings in the String Translations are being translated (that are not in the ATE) while the translations were made with ATE?

Scherm­afbeelding 2024-07-04 om 14.10.22.png
Scherm­afbeelding 2024-07-04 om 13.58.50.png
July 6, 2024 at 12:08 pm #15903105

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

1. When you translate a page using the default WordPress Editor, the content is saved in the site's database. If you use the Advanced Translation Editor (ATE) instead, the content is saved both in the site's database and in ATE's translation memory.

When you view the page on the frontend, it displays the content from the site's database. However, when you load the page in ATE, it shows the content from ATE's translation memory. Since you've deleted the translation memory, the fields appear empty in the backend, but the frontend still shows the content from the site's database. You can edit the page in the default WordPress Editor to access this content.

To completely remove the translated pages, follow the instructions in this document:
https://wpml.org/faq/how-to-delete-the-translation-of-a-page/

2. When you translate page builder content using the WPML Translation Editor, it registers the page builder strings as string packages in WPML >> String Translation for internal use. We don't recommend modifying these strings in WPML >> String Translation because they might be overwritten when you update the translation using ATE again.

When you use any shortcode on a default language page and then translate that page, WPML copies the shortcodes into the secondary language to display the content correctly in secondary language. If you don't translate the page that having a shortcode, it won't automatically copy the shortcode into the secondary language.

Regarding the system translating strings by itself, this shouldn't happen with the "Translate What You Choose" option. If you're seeing translations for strings that aren't in ATE, it might be due to this process of copying shortcodes for proper display, but it shouldn't change the actual string translations.

Please let me know if you need further clarification.

Thank you for your cooperation and patience

The topic ‘[Closed] Translation memory keeps resetting translations’ is closed to new replies.