This thread is resolved. Here is a description of the problem and solution.
Problem: The client is setting up a multilingual site using WPML and encountered an issue where buttons on the German version of the site link to English pages instead of German ones. Additionally, the client needs to embed different shopping carts for each language. Solution: 1. We advised the client to check if the links in the buttons are using a relative path or a full path. If using a full path, changing it to a relative path might help. 2. We suggested using the WPML->Settings->Translate Link Targets and clicking on 'Scan now' to see if the links get adjusted. 3. If the issue persists, we recommended editing the page in the main language, making a minor modification (like adding an empty space), and then updating the translation. 4. As a test, the client was advised to edit one of the links in the main language to a relative path and then update the translation to see if the button points to the correct URL in the secondary language. 5. The client successfully resolved the issue by changing the links in the buttons to the short version and saving the translation again.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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 the problem persists, please open a new support ticket.
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 am trying to set up a multilingual site using WPML. The main language is English, and I need to ensure that the German version of the site has buttons linking to the correct German pages. I also need to embed a different shopping cart for each language. The embed code is the only thing I altered.
Symptoms:
In the German version of the site, the buttons are linking to the English pages instead of the German ones.
Questions:
How can I ensure that the buttons on the German version of the site link to the correct German pages?
Is there a specific way to embed different shopping carts for each language using WPML?
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
Can you please edit the original page containing the button and check how the link is configured, is it using the relative path or the full path to the URL?
It is possible that by the time the page containing the button was translated, the page where the URL linked to didn't have a German version yet, the way the links translation works is that by the time you translate or edit the translation of a page containing an URL, if WPML finds a translation for the page of the link, it automatically adjusts it to point to the secondary language.
You can try to go to WPML->Settings-> Translate Link Targets and click on Scan now to see if the links get adjusted.
If it doesn't work, please try to edit the page in the main language and make a minor modification to it, like adding an empty space for example.
After that, please update the translation and save it as it is, this should fix the link in the German pages.
Thank you, please let us know how that goes.
Mateus
1.
I don't know the difference between relative path or the full path. The link in the button is inserted as folows: hidden link
2.
"It is possible that by the time the page containing the button was translated, the page where the URL linked to didn't have a German version yet, the way the links translation works is that by the time you translate or edit the translation of a page containing an URL, if WPML finds a translation for the page of the link, it automatically adjusts it to point to the secondary language."
Yes, that was the case. I tried what you suggested, but the problem remains.
-> no change, "0 links adjusted"
3.
"If it doesn't work, please try to edit the page in the main language and make a minor modification to it, like adding an empty space for example.
After that, please update the translation and save it as it is, this should fix the link in the German pages."
I did that, but the problem is not resolved
Please, I need a quick solution for this, because we have to go online on Monday. Thank you.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello,
I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
Please, let me know if you need any additional details. Have a nice day.
Hi Mateus, thank you very muzch for your swift help. I changed the links in the buttons to the short version and saving the translation again and it helped. What a relief!
I am using Elementor and when I am searching for a link to set it, it always puts in the long version...