Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with URLs not correctly pointing to the translated versions of pages in different languages on their website. The main problems are with header, footer, and on-page links, where some links have been auto-translated, and others have not.
Solution:
1. Verify that the pages or posts have been translated into the relevant languages.
2. Go to WPML > Settings and in the 'Translate Link Targets' section, click on the 'Scan now and Adjust links' button.
3. Update the link format to relative by editing the module or text where the link has been added. For example, use '/page-name' instead of the full URL.
4. Save changes and update the translation.
5. If issues persist, especially with custom links in images as seen in Elementor templates, enter 'http' in the search box within the Translation Editor to find and translate the URL.
6. For further guidance on translating Elementor templates, visit https://wpml.org/documentation/plugins-compatibility/elementor/#translating-elementor-templates
7. If automatic translation adjustments do not resolve the issue, use the WPML Troubleshooting tools to synchronize post taxonomies and fix post-type assignments for translations.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also 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. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.

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 Prosenjit Barman 10 months, 3 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
September 1, 2024 at 10:23 am #16128707

bernardH-9

Background of the issue:
I am trying to translate URLs to their respective language page versions on my site hidden link. I want to solve the problem of foreign language pages pointing their URLs to the English version pages.

Symptoms:
Issues are with header links, footer links, and on-page links. Some links have been auto-translated, and others have not.

Questions:
What is the best way to solve the problem of foreign language pages pointing their URLs to the English version pages?

September 2, 2024 at 8:08 am #16130358

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand what you're looking for. Please note that if the page you're linking to has been translated into another language on your site, the link should automatically adjust to direct users to the corresponding version in that language. If the link isn’t updating automatically, could you please verify that the page or post has been translated into the relevant language?

If so, please do the following and check if that helps in solving the issue.

- Please go to "WPML > Settings" and scroll down to the 'Translate Link Targets' section.
- Click on the "Scan now and Adjust links" button and wait till the process is completed.

You might also try updating the link format to relative and see if that helps direct users to the correct page or post.

- Open the default page in the Editor.
- Edit the module or text where you’ve added the link and use a relative format for the URL. For instance, enter '/page-name' in the URL field instead of using the full URL, like hidden link.

Once you've updated the link, please save your changes and update the translation. Then, check if this adjustment has helped to solve the linking issue.

Please feel free to let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

September 8, 2024 at 4:01 am #16151974

bernardH-9

Hi,

Just to quickly update. I am still working to resolve this.

I have found the way to resolve the menu's using the menu sync feature. I didn't see that before and that has solved the problem with the top navigation and the footer menu's that previously were translated but did not have their URL's pointing correctly to new translated pages.

Currently, I am narrowing down on exactly what is not working for the URL's in the body content of the pages, and why the...

"- Please go to "WPML > Settings" and scroll down to the 'Translate Link Targets' section.
- Click on the "Scan now and Adjust links" button and wait till the process is completed."

...solution is not working for this.

This problem exists on almost every page of the site which has links in the body content.

The URL's are coming in various different forms. Some are links attached to body text. Some are attached to buttons. Some are attached to images.

The first and most important page to solve this problem for is: hidden link

On this page the elementor template injects links into 2 places to increase the click target size. One is a button and the other is the image itself.

I will continue working on this, but how should I proceed? If I edit the translation for the page, none of these url's are showing up in the translation editor.

September 8, 2024 at 4:54 am #16151988

bernardH-9

hidden link

Hey Prosenjit, I recorded a video here showing the steps I've taken and what's currently confusing me.

September 9, 2024 at 9:05 am #16154639

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
I hope you're doing well.

Thank you so much for the detailed video! It’s really helpful in understanding how the issues are occurring.

Based on the investigation of your site, it seems you have added custom links to the images, which could be causing the issue with the links not appearing correctly in other languages. From the video, I noticed you entered the Translation Editor but didn't search for the URL.

Enter 'http' in the search box within the Translation Editor. The link should then appear in the list, and you'll be able to translate it.

Similarly, when translating the Elementor Header template, you can search for the link and translate it in the same way mentioned above. To understand the process of translating the Elementor templates, please check the guide below.

- https://wpml.org/documentation/plugins-compatibility/elementor/#translating-elementor-templates

I hope thew steps above will help. If you need further assistance or clarification, feel free to let me know. I will be happy to help.

Best regards,
Prosenjit

September 10, 2024 at 3:27 am #16159164

bernardH-9

hidden link

Hey Prosenjit, here is the follow up to your suggestions. In the process I tried a few things and discovered a partial solution.

The issue is that this solution involves me paying for translations that I have already paid for.

Thanks for your help.

P.S. Please watch the video back on 1.5x speed because it is a bit long.

September 10, 2024 at 3:40 am #16159167

bernardH-9

hidden link

I figured out why the URL on the "restaurants" image + text did not translate while the other 2 did.

It was a 301 redirect. The link still worked fine but the slug for the destination had since been changed, likely for SEO purposes.

September 10, 2024 at 2:53 pm #16162300

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thank you for the detailed update. I now have a clear understanding of the current status of the issue(...and you pronounced my name correctly too! :))

I won’t ask you to automatically translate the pages anymore. Instead, could you please follow these steps and check if the links in the translation appear correctly?

- Go to "WPML > Support" and click on the "Troubleshooting" link.
- In the Cleanup section, you’ll find a dropdown. Select 'Pages' from the list and click on the "Synchronize post taxonomies" button.
- Once the process finishes, also click on the following:
- Clear the cache in WPML
- Set language information
- Fix post-type assignment for translations

These steps will ensure that the translations and related data are correctly synchronized for both the default language and the translations.

Once done, move to the next step:

- Open the "villas-bali" page in the Elementor editor.
- Update the links on the images that show room details. Here’s what to do: remove the links from the images, save the changes in Elementor, and then re-add the links. After that, make a small update—like adding a dot with any text—and save the changes again.
- Exit the Elementor editor.
- Open the page in the WordPress editor.
- In the 'Languages' meta section on the left sidebar, click the update icon (curved arrow) to complete the translation update.

This way, I hope the links will be updated, just like they were after the automatic translation. PLease give these steps a try and let me know how it goes. I will be happy to take a closer look and assist further.

Best regards,
Prosenjit

September 12, 2024 at 12:46 am #16168441

bernardH-9

hidden link

One small problem still

September 12, 2024 at 3:50 pm #16172646

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thank you for the update.

I'm glad to hear that the URL issue has been resolved.

Regarding the issue with accessing the French version from the homepage - Upon checking the 'villasemadhibali.com' site, I discovered that the redirection plugin you are using is configured to redirect the French version of the Homepage to the default hompeage. This is why you see a redirection when trying to access the French version of the site.

The redirection is set using the 'Redirection' plugin. To solve the issue, kindly navigate to "Tools > Redirection > Redirects" in your admin panel and remove any redirection rules that have been set for the French language. This particularly applies to any rules set for "hidden link" or simply "/fr".

I hope it helps. Feel free to let me know if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

September 15, 2024 at 12:32 am #16179212

bernardH-9

Thanks for the help Prosenjit!

I've got WPML fully set up and running without issues on 3 sites now.