[Resolved] Links being defaulted to main language after new translation
This thread is resolved. Here is a description of the problem and solution.
Problem: When using WPML with Elementor, after translating a page to secondary languages, any new text added in the original language and updated in translation causes previously saved button links to revert to the original. Solution: To fix this issue, you need to register custom page builder widgets for translation of the Hub theme by Liquid Themes. This involves adjusting the
wpml-config.xml
file in your theme to include the links in the translation process. Here is a step-by-step guide: 1. Check if your Hub theme's by Liquid Themes
wpml-config.xml
file already includes widget translation configurations. 2. Modify the XML configuration to add the button links for translation. For example, add the following field to your button widget configuration:
<field type="Heading: Link URL" editor_type="LINK">link>url</field>
If this solution does not apply to your case, or if it 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 issues persist, please open a new support ticket at our 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.
Background of the issue:
We're using WPML to edit our page for the client in different languages.
The setup:
We have the page ready in German (main language) and want to translate to English. All the translation work fine, but the links in the buttons do not get updated automatically. No problem, as we can just switch to English, open Elementor and manually adjust the links.
The problem is, whenever you add a new text in German, then update the translation go English (which works fine), the previously saved links are defaulted back to German.
Thank you for the reply. Unfortunately the method in your video does not work, it does not show us the links when we're searching for them. Is there anything that needs to be activated first for that?
Unfortunately I can not share any screenshots, as this is not a live site, but the mentioned behaviour works with every WMPL + Elementor setup. Alternatively, I'll happily share the access details, so you can take a direct look.
I already ran the "Translate Link Targets", but unfortunately it did not change.
1. Create a page with content (I created "Testpage" with some text and a button)
2. After saving the page, I exit elementor and go to the Page overview where my testpage is.
3. I click in the "+ Plus" Icon to translate the page to German
4. Unfortunately, in my version, I can not translate the button in the Advanced Editor. So I go back to the Page overview, change the language with the icon on the top and click "Edit with Elementor" for my testpage
5. I change the link from /contact to /kontakt and save the page.
I test if the translations (incl. button) work in the frontend, all good.
6. I get a new text, that I have to add to my page. I open my page in my default language (here in English) and add the text in Elementor and publish.
7. I go back to the Page overview and click the "Refresh - Update German Translation" icon. The Text has been translated automatically again and I complete the translation
I go back to the frontend, the translated text is visible, but the button, that I changed from /contact to /kontakt, is now reverted back to /contact.
As my colleague mentioned, the behavior you are experiencing is normal. When you save a translation using the Advanced Translation Editor, all the translations come from there. If you later switch to the WordPress editor, switch to the secondary language, and save some content with Elementor, it will overwrite changes made in ATE and vice versa. It's important to stick to one translation method.
Regarding the /contact link, you should translate it in ATE instead of making the change directly with Elementor on the translated page. I have attached a screenshot.
Hi Andrey, unfortunately it is a paid theme and I would have to get another license. Would it be possible if I just share the credentials to the existing site?
I believe it should work without a license, but I am activating the private fields so you can share the access. Please also include the steps to locate the specific button.
Thank you for providing the information. The access credentials are working for me.
Can you please provide the specific steps to reproduce the issue? This will ensure that I am examining the same page and button where you are encountering the problem.
Please make sure to update the Elementor plugin on your website.
The steps are the same as described above, let me copy and paste that again below. You can use any page to test this one as this is not a live site. I've also updated Elementor to the newest version.
1. Create a page with content (I created "Testpage" with some text and a button)
2. After saving the page, I exit elementor and go to the Page overview where my testpage is.
3. I click in the "+ Plus" Icon to translate the page to German
4. Unfortunately, in my version, I can not translate the button in the Advanced Editor. So I go back to the Page overview, change the language with the icon on the top and click "Edit with Elementor" for my testpage
5. I change the link from /contact to /kontakt and save the page.
I test if the translations (incl. button) work in the frontend, all good.
6. I get a new text, that I have to add to my page. I open my page in my default language (here in English) and add the text in Elementor and publish.
7. I go back to the Page overview and click the "Refresh - Update German Translation" icon. The Text has been translated automatically again and I complete the translation
I go back to the frontend, the translated text is visible, but the button, that I changed from /contact to /kontakt, is now reverted back to /contact.
As you said, I see you are using the button as part of your theme. Have you considered trying the following steps?
1. Add the widget Button (not a Liquid button) to the page.
2. Insert the full link: hidden link and save the page.
3. Complete the translation, and the link will be automatically translated.