Skip Navigation

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:

<wpml-config>
	<gutenberg-blocks>
    <gutenberg-block type="kadence/advancedheading" translate="1" label="Kadence: Advanced Heading">
      <key name="link" />
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

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.

This topic contains 19 replies, has 3 voices.

Last updated by Waqas Bin Hasan 2 months, 3 weeks ago.

Assisted by: Waqas Bin Hasan.

Author Posts
November 26, 2023 at 3:35 pm #14925225

savvasc-2

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?

Is there a similar example that we can see?

What is the link to your site? hidden link

November 27, 2023 at 10:04 am #14928627

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

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:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Remember to add these lines before the line where it says:
/* That's all, stop editing! Happy publishing. */

Then, try these WPML Troubleshooting options: https://wpml.org/documentation/support/wpml-troubleshooting-options/, specially:

- 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.

Regards.

November 27, 2023 at 5:03 pm #14933281

savvasc-2

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

November 28, 2023 at 7:42 am #14936335

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

November 28, 2023 at 11:40 am #14938229

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates, but unfortunately I am unable to login. While trying the supplied user/pass, WP returns the following error:

> The username w*******s is not registered on this site.

Please check on your side and provide correct credentials. I've enabled your next reply as private again, in case you want to give updated login info.

November 28, 2023 at 11:53 am #14938481

savvasc-2

tis is not private

November 28, 2023 at 12:09 pm #14938665

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Strange, however, I 've set it again, please try now.

November 28, 2023 at 12:22 pm #14939037

savvasc-2

- i do not know if i do something wrong but my reply is public

November 28, 2023 at 12:47 pm #14939429

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

This is really strange, can you take a screenshot of the page about what do you see?

However, if it still doesn't work, please set the credentials to what you previously provided and check on your side too.

I've enabled the private reply again (see attached).

pr.jpg
November 29, 2023 at 5:27 am #14946059

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the access, I was able to login and working on this. I'll get back to you accordingly.

November 29, 2023 at 8:51 am #14947283

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

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.

See https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/#how-do-i-translate-urls-with-the-advanced-translation-editor for details.

Screenshot 2023-11-29 132128.jpg
November 30, 2023 at 3:09 pm #14964375

bradC-7

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.

Thank you,
Brad

November 30, 2023 at 5:08 pm #14965471

savvasc-2

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?

ml3.png
ml2.png
ml1.png
December 1, 2023 at 6:28 am #14968903

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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).

December 1, 2023 at 7:36 am #14969435

savvasc-2

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?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.