[Resolved] WPML translator not working when translating links
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with buttons linking to internal pages and PDFs not correctly translating to the target language. Specifically, the button to the shop in English is not linked to the English version of the shop but to the original language link. The client has tried both the Advanced Translation Editor (ATE) and the Classic Translation Editor, with translations being lost and links not automatically pointing to the correct translated pages.
Solution: 1. We recommend updating all WPML plugins to the latest version, ensuring a backup is made beforehand. For instructions on updating WPML, please refer to this documentation.
2. When adding buttons in the default language, avoid using different translation editors as this may cause translations to be deleted. Stick to one editor, preferably the ATE, which has translation memory. For translating links via the ATE editor, follow the guide here: Translating Links with Advanced Translation Editor.
3. If some links are not automatically pointing to the correct translated page, it may depend on whether the translated page existed at the time of translation. You can adjust this by using the 'Translate link target' option from WPML > Settings. Additionally, check the Avada XML WPML config to ensure that the button element is set to adjust links to translated pages. For more information, see Using WPML with the Avada Theme and Language Configuration Files.
If this solution does not seem relevant to your issue, please do not hesitate to open a new support ticket in our forum for further assistance: WPML Support Forum.
0% of people find this useful.
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.
I have several pages with buttons linking to
(1) Pdf page
(2) Internal links
Please visit the following page: hidden link and check how in ENGLISH the button to the shop is not properly linked to the english link of the shop. It is linked the original language link.
I was only able to translate the button linking to the pdf page when I switched from the Advanced WPML translator to the Classic WPML translator.
1) Please update all WPML plugins to the latest version by going to the Plugins → Add New page, click the Commercial tab, and then click Check for updates.
2) How are you adding this button to the default language? Via page builder inside the page or via some template?
3) Try not to mix the translation editor. Use only one as it might cause for your translation to be deleted, and you need to re-enter them. I advise using ATE, as it has translation memory.
Try the next method for translating links via ATE editor:
1) *Plugin updates*: our site is in production. We can't update the plugins right now. We do it in a controlled way during our low season since our webpage is our main source of revenue. We have bad experiences in the past where we faced severe issues with the web performance due to a bad interaction between your plugin and woocommerce. Please consider study our case in our current conditions. WPML plugins were updated just a few months ago.
2) *How we add the button?*: we use avada bulider in the default language. No template.
2) Some buttons linking to internal pages that are translated doesn't need translation but there are other buttons that, if we don't look for that link and manually specify its corresponding page in the translated language they point, in the translated version, to the original language link. This is time consuming cause we have to review each button on the page that links to the correct page. Why some links are automatically pointed to the right translated page and some others remain with the original link?
1) That is expected, and same reasons why I advise on continue to use ATE, since it saves translation in translation memory from our side, so you do not need to re-translate it again. I am sorry my colleague has not pointed that out to you as it is stated in our docs.
You can manually copy-paste them or use automatic translation to re-translate them.
2) Why some links are automatically pointed to the right translated page and some others remain with the original link?
It can depend if the translated page existed at the time of translation, if not then you can try the Translate link target option from WPML > Settings to adjust it.
Another thing could be that something changed in the Avada XML WPML config, where for button should be provided to adjust links to translated pages (type=link).
We will be glad to help further and check if there are some buttons that do not adjust translated links when translation pages exist.
Since it seems the original issue was solved, if you still have another issue or doubts on related topics, I would kindly ask you to open a new ticket, so we can keep things clear and easier to manage the conversation. We limit 1 issue per ticket.