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 1 year, 2 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
December 1, 2023 at 8:19 am #14969843

Waqas Bin Hasan
Supporter

Languages: English (English )

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

This isn't a problem actually, because the URLs using extended characters are converted into unicode counterparts. If you copy hidden link and paste into browser's address bar it turns into hidden link. So the browser's address bar 'll always show the readable format. While if you copy hidden link from address bar and paste it elsewhere, it 'll turn back into unicode translated one.

See https://stackoverflow.com/questions/2742852/unicode-characters-in-urls and hidden link for details.

In short, such URLs are stored and transmitted using unicode translated versions.

However, if you still need more help and think of it a real problem, I recommend opening a separate ticket because as per forum policy we can only handle one issue per ticket. So you can get more to the point help, without mixing up several issues in one long ticket.

December 1, 2023 at 9:27 am #14970429

savvasc-2

Thank you. I will open a new ticket to solve this. Should i resolve this new issue (change all translated urls) before fixing our issue discussed here?

December 1, 2023 at 11:36 am #14972069

Waqas Bin Hasan
Supporter

Languages: English (English )

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

You can keep this ticket open until the issue discussed here isn't resolved. Let me know the outcome of what I mentioned earlier (https://wpml.org/forums/topic/internal-links-do-not-point-tothe-translated-pages/page/2/#post-14968903) after trying.

December 2, 2023 at 10:38 am #14977213

savvasc-2

I have done it with your help, except for one link that still points to homepage in english instead of the translated homepages (greek or russian). I have placed this link-to-homepage, at the bottom of each page from the beginning. The sting is translated to the two new languages but takes you to the english homepage. What do you think? please see screenshot

wpml bottom link.png
December 4, 2023 at 7:25 am #14982377

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for the updates and glad that it worked.

For that "Home" link, I noticed that it is a Kadence block, which needed to be recognized by WPML. So I 've registered it in WPML -> Settings -> Custom XML Configuration:

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

See https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/ for details.

And, then updated the hidden link in English so the changes are triggered. Then update Greek and Russian translation. And I was able to find the home link by searching in ATE (see attached). So I fixed the links accordingly.

All you need to do is:
- Edit other pages one by one, in English (default language), where you've used this block for home link.
- Make a little change in the page text, like a dot or full stop.
- Save.
- Edit the translations, search for "http" and fix the home link as per the translation.
- And you should be all set.

ru.jpg
el.jpg