Skip Navigation

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.

Tagged: 

This topic contains 11 replies, has 2 voices.

Last updated by Lucas Vidal de Andrade 1 month, 3 weeks ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
September 10, 2024 at 11:34 am

lodeD

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?

September 10, 2024 at 11:54 am
September 10, 2024 at 6:09 pm #16163134

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

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.

September 16, 2024 at 7:17 am #16181585

lodeD

In order to recreate this situation, I need Elementor PRO and Betterdocs to be installed. Otherwise I cannot replicate this issue

September 16, 2024 at 1:25 pm #16184226

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

I've installed and activated Elementor Pro and Betterdocs. Can you please install and activate Betterdocs Pro in the Sandbox and reproduce the issue?

It's a quick test, we'll delete this environment afterwards. Let me know.

September 16, 2024 at 5:43 pm #16185142

lodeD

Hello,

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!

Kind regards,
Lode

September 16, 2024 at 6:22 pm #16185295

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Thank you so much for sharing the results. I'll analyze that along with my colleagues and give you feedback as soon as we have new information.

September 17, 2024 at 2:25 pm #16189220

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

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.

September 17, 2024 at 4:46 pm #16189988

lodeD

Hello Lucas,

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:

add_filter( 'wpml_pb_elementor_widget_dynamic_id_converters', function( $converters ) {

$isLottie = \WPML\FP\Relation::propEq( 'widgetType', 'image-box' );

$lottieLinksLens = \WPML\FP\Obj::lensPath( [ 'settings', '__dynamic__', 'link' ] );

return array_merge(
$converters,
[
[ $isLottie, $lottieLinksLens, 'internal-url', 'post_id' ],
]
);

} );

September 17, 2024 at 7:05 pm #16190352

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

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.

Before I do that, can you please share a copy of your website with me? Here are the steps to take:
https://wpml.org/pt-br/faq/provide-supporters-copy-site/

I've enabled the private fields. Thanks in advance, for bringing that up and for cooperating.

September 18, 2024 at 6:33 am
September 18, 2024 at 12:01 pm
September 23, 2024 at 1:38 pm #16210111

lodeD

Hello Lucas,

I have added you as a user of the Google Drive files.

Kind regards,

Lode

September 23, 2024 at 6:02 pm #16211360

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you so much. I've forwarded your ticket to our devs and will get back at you as soon as I have new information.

October 4, 2024 at 12:10 pm #16253997

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

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.