[Resolved] internal links do not point tothe translated pages
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with links on translated pages pointing to the English versions despite running the 'Translate Link Targets' function and clearing the cache. Additionally, the client wants to change all translated URLs to use the English alphabet to avoid unicode characters in URLs. Lastly, there is a specific link to the homepage that, even when translated, redirects to the English homepage instead of the translated versions.
Solution: For the general link translation issue: 1. Open the page in the default language for editing. 2. Edit the translation. 3. In the Advanced Translation Editor (ATE), search for the links (i.e., 'http' or 'https'). 4. Correct the link to the translated version manually. For more details, see how to translate URLs with the Advanced Translation Editor.
Regarding the unicode characters in URLs, this is not an issue as browsers convert them to readable formats automatically. For more information, see Unicode characters in URLs and URL Encoding Reference.
For the specific link to the homepage: 1. Register the Kadence block in WPML -> Settings -> Custom XML Configuration using the following code:
For more details, see how to make custom Gutenberg blocks translatable. 2. Update the English page to trigger the changes. 3. Update Greek and Russian translations. 4. Search for 'http' in ATE and fix the home link as per the translation. 5. Repeat for other pages using this block for the home link.
If this solution doesn't look relevant, please 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.
Tell us what you are trying to do? I have translated website from english to greek and russian. Links on translated pages point to the english pages.I did run the Translate Link Targets and cleared all cache but still nothing changed.
Is there any documentation that you are following?
IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.
- Fix “WP Memory Limit” to at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set this in your wp-config.php file by adding following code:
- Clear the Cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Fix WPML table collation
- Set language information
- Cleanup and optimize string tables
If that doesn't help, then please continue with the following:
- Deactivate all plugins except WPML and its addons and check for the issue.
- Activate each plugin one-by-one, while keeping check on the issue after a plugin is activated. This way you'll be able to pinpoint a plugin having a conflict (or problem), if any.
- If the problem persists, repeat the above steps with a default theme of WordPress (i.e. 2021 or 2023).
Please let me know and I'll try my best to assist you further on the matter.
Hi! Wp memory limit set to 256mb and did all the troubleshooting options you suggested. Nothing has changed. I did disable plugins like cookie compliance and rankmath nothing has changed. Also i tried disabling kadence pro, kadence blocks and kadence blocks pro but site content and structure goes away/can not test anything because then there is no header, language switcher... Same when i switched to 2022 wp default theme, not much left on the site. Problem remains and i need more help please
Thank you for the updates and your efforts for trying those options.
I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.
Your next answer will be private, to share this information safely.
Also provide detailed steps to reproduce the issue and links to pages in admin and on frontend.
IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.
I was able to find and fix the problem at one place (hidden link) for "Services" button at end of the text.
In fact, there's no problem but the links part of the text need to be translate in ATE (see attached). So you can simply follow these steps:
- open page in default language for editing.
- edit the translation.
- in ATE, search for the links (i.e. http or https).
- and correct the link to translated version.
Good morning, jumping in as I have the same issue. Is there a "best practices" guide on how to handle links?
I have the pages linked to their respective english content within the website and previously would link to "/about/" translated to "/fr/a-propos/" where the website was automatically adding the "/fr/" portion and in the advanced translation editor, all that appeared for my translator in that field would have been "/about/" which they would have entered "/a-propos/".
Now it seems that the "/fr/" is being dropped but instead of getting 404 errors, the links open the english pages instead of the french ones. I think this is a similar question and helpful to OP so adding here but can also post as a ticket if you'd prefer.
I can't locate the page url in the ATE. Should Translated documents options be on: Translate (this will include the slug in the translation and not create it automatically from the title)?
Will you please have a look at the screenshots and quide me better?
You locate the URL like you did it in your second screenshot, by typing "http" or "https". However, please do not confuse that you 'll find "translated" link of the target page. As per your current setting, you'll see the same default language URL.
Since your setting in WPML -> Settings -> Translated documents options is set to "Translate (this will include the slug in the translation and not create it automatically from the title)", you'll need to "find" and "translate" the URL manually.
I've recorded my screen for you, please watch hidden link for details.
------
@bradC-7 (Brad): Yes please report in a separate ticket, because IMO that's a different problem (like getting 404 page not found).
Thank you, i will try this! I also want to change all translated urls Greek and Russian to use english alphabet so i do not get this:
(hidden link)
How should i proceed with this? It should be done first?
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.