Home›Support›English Support›[Resolved] on every page of translated docs generated by Betterdocs, there is a link that isn't updated to the...
[Resolved] on every page of translated docs generated by Betterdocs, there is a link that isn't updated to the...
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is using Betterdocs to create FAQs and has translated them into English and German using WPML. However, the links within these translated documents are not updating to the translated language, specifically links going to Elementor Landing Pages. Solution: We recommend the following steps to ensure that links in the translated documents update correctly: 1. Instead of linking directly to the Elementor template, create a page that uses this template. 2. Translate this new page into the required languages. 3. In your Betterdocs document, replace the link to the template with a link to the newly created page. 4. Update the translation of the Betterdocs document. 5. Navigate to WPML > Settings and select 'Translate link targets' to apply the changes. After completing these steps, please test the links again. Remember, the translation of internal links works for pages but might not apply directly to templates.
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. Should the problem persist, please do not hesitate to 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.
Background of the issue:
I have created the FAQ's using Betterdocs and translated them to English and German using WPML. I am trying to ensure that the links in the translated documents are updated to the translated language. The site I need help with is hidden link.
Symptoms:
The link going to the Elementor Landingpages isn't updated to the translated language on every page of translated docs generated by Betterdocs. I have already had a similar issues with links to this landingpages. Your backend has developed code for it that solved this immediately
Questions:
How can I ensure that the links in the translated documents are updated to the translated language?
Is there a known issue with WPML and Betterdocs regarding link translation?
What steps can I take to troubleshoot and resolve this issue?
To ensure if this is an issue specific to your website, or a general compatibility issue from WPML, I've created a Sandbox environment, so we can analyze the behavior in isolation. You can access it here:
hidden link
Please recreate the issue, so we can check its behavior. Just the minimum is necessary. In your case, recreate the page with the link, just as you did in your website, and insert a link to another translated page. Let's check if the behavior is the same.
In the SB, WPML is already set up with two languages. Please let me know if you have any specific questions.
I have created a Landing page hidden link in EN and translated it in DE:hidden link
Then, I created a Betterdocs document hidden link with a link to the EN Landingspage and translated it to DE: hidden link
This DE version is pointing to the EN version of the Landingpage, as I have on my website in both translated languages!
Landing Pages, inside Elementor, are template elements. The internal link translation might not work for templates. Please use the template inside a page.
Follow these steps:
1. Create a page that use the template (or create a page from scratch);
2. Translate the page;
3. Replace the link to the template with the page link in the Betterdocs document;
4. Update the Betterdocs document translation;
5. Go to WPML > Settings > Translate link targets;
After that, test again. As I said, the translation of internal links is valid for pages, but might not be valid for templates.
I cannot be expected to change 50 landing pages and then another 40 Betterdocs pages. If you look back at some of my questions from 1.5 to 2 months ago, you'll see that your colleagues created a code for similar pages where we encountered the same issue. That problem was resolved when I copied the code into functions.php.
I have already faced numerous challenges translating our website using WPML, so I would appreciate it if your developers could create a solution for the Betterdocs documents as well. For reference, here is one of the codes your colleagues developed:
I understand. I checked and was able to reproduce the issue. I will escalate your ticket to our devs, to check if we can find a suitable workaround. Thank you for sharing the previous code.
Thank you for your patience. I got feedback from our developers: "unfortunately, there is no other option available at the moment. Elementor is using a custom rewrite rule for this post-type and WPML does not have the functionality to translate it yet."
We've created a feature request to analyze the implementation, but we have no estimation if it will ever or when it will come out. Another option is to change the translation mode inside the post, in the primary language, to "WordPress Editor". This way, you can create the page as you wish and insert the links you want. Here you can find more information: https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/
The link is focused in different designs, but you can use the same design and only replace the texts and links. I appreciate your comprehension.