Skip Navigation

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.

Tagged: 

This topic contains 12 replies, has 1 voice.

Last updated by frankG-4 2 weeks ago.

Assisted by: Otto.

Author Posts
May 27, 2025 at 9:52 am #17076945

frankG-4

Background of the issue:
I am trying to automatically translate content from German (DE) to English (EN) using WPML. Specifically, I have buttons with links that include anchors and menu anchors. The menu anchor from the menu anchor widget is translated correctly, but I cannot verify if the button link anchor is translated because it is not visible in the translation. The issue can be seen on the page: hidden link.

Symptoms:
The link jumps to the correct English page but cannot find the anchor because the anchor at the end of the link is not translated and still contains the German anchor word. For example, the anchor is #adv-qualifiziert in German, but it should be 'adv-qualified' in English. This issue is present throughout the website.

Questions:
Why is the button link anchor not visible in the translation?
How can I ensure that the anchor in the link is translated correctly?

May 28, 2025 at 9:50 am #17082553

frankG-4

I did another test: Yes it's true, that I can see and edit the Button Link, when I change something in the German page with elementor und run the translation again. Now I set the right English Link into the Button link. and Finalize the translation. Now the anchor at the end keeps being in English, but the Link itself is changed to German.

Instead of
hidden link
I get
hidden link

May 28, 2025 at 5:35 pm #17084871

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

To be able to investigate the problem, we need to replicate the issue on a clean installation.
I created a clean installation of WordPress, Elementor, WPML, and all necessary WPML add-ons.
You can access the WordPress dashboard using the link below:
hidden link

Kindly follow the steps below:

- Don't restore your site there.
- Create a page just with the element you are trying to translate without success exactly as you are using it there.
- Then let me know the steps to see the problem and reproduce it.

Best Regards,
Otto

May 31, 2025 at 1:45 pm #17094232

frankG-4

Hi Otto,

yes I will do, but I need a little time, as we had a long weekend in Germany. I let you know, when I am ready.

June 2, 2025 at 12:51 pm #17098107

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks for the heads-up.

Best Regards,
Otto

June 2, 2025 at 2:33 pm #17098338

frankG-4

Hi Otto,
I did the following now: I activated all WPML Plugin we are using, WooCommerce and installed Elementor pro. Under WPML settings, I checked the settings from our site and configured the settings at the testing site in a similar way.
I created 2 new pages: Test Page 1 and Test page 2. In Test Page 1 I added a button with an anchor link to testPage 2 (anchor-name is "hammer"). Test Page 2 contains only Headlines, Lorem Epsum Text and the Menu Anchor (hammer). I translated Test page 1 and the Test Page 2 (we do this in the All Pages menu by clicking at the + Sign - we always translate there. We do not use the translation dashboard). In the translation of Test page 2 I changed the Menu-anchor text, because in our real website the anchor texts are most often German words, which are translated by the automatic page translation as well.
Then I translated test page 1 again (to see, if it automatically finds the menu anchor). I tested. The Link to Text page 2 is translated, the menu anchor keeps the same as in German. We know about this problem. I already had another ticket opened with this problem. To solve this, I have to open the translation and at the gear in the upper right corner I have to switch to "show all links". Then I have to edit the German page again. I added the lorem Ipsum Text. But at the translation I do not see the Lorem Ipsum now and not the link of the Button.

This is not the real Problem, but we have to fix this first, before I can manually edit the Button link to see, what happens.

Thanks, Frank

June 2, 2025 at 4:16 pm #17098740

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello Frank,

Thanks.

Check the screenshot attached, please. I

I changed the translation of Menü Anker. In fact, I removed the translation, changing it from englishhammer to hammer, and now the links works fine.

This word is only visible in the HTML as it's the ID attribute of the section. Anchors need to be the same in both languages because WPML does not know how to translate automatically the anchor part of a URL. Alternatively, we will need to translate the URL manually.

Is this a suitable solution for you?

Best Regards,
Otto

CleanShot 2025-06-02 at 13.07.43.png
June 3, 2025 at 9:15 am #17101064

frankG-4

Hi Otto, this is exact our Problem. The Menü anchors ARE TRANSLATED in our main site, as they are normal German Words and as they are shown in the Translation. I know, that this is a Problem. Therefore we wanted to change the BUTTON LINK. Normally, when we switch to ALL LINKS VISIBLE, we see the BUTTON LINK after a change in the German page, when the translation has to be done again.

This is actually not possible in your Demo site. Do we need to set an additional switch in WPML? I do not see the Button Link in the translation.

June 3, 2025 at 1:08 pm #17102425

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks for the clarification.

I added the following in WPML > Settings > Custom XML configuration:

<wpml-config>
  <elementor-widgets>
    <widget name="button">
      <fields>
        <field>text</field>
        <field>link>url</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

Then I made a small change in the original page, and after that the link is available for translation in the translation editor.

Then I changed the Test-2 page anchor to "englishhammer" and translated the link in Test 1. As far as I can see, it works as expected.

Can you please check it?

Best Regards,
Otto

June 3, 2025 at 2:29 pm #17102848

frankG-4

Hi Otto,
thanks for this hint. Yes, this setting was missing. In our Sites, we already had these Button-Settings in the XML config.

But I think, we have to switch to our staging site now. This is just an example. We have this Problem in other pages as well. In this page hidden link there are these 3 Buttons in German:
DICHTEMESSUNG PROBENÜBERSICHT,
DICHTEMESSUNG NORMENÜBERSICHT,
DICHTEMESSGERÄTE EINSATZGEBIETE.
All 3 link to #dokumente, which is a menu anchor at the same page, showing downloadable documents.

Now go to the English page: hidden link. The menu anchor is translated to #documents. We translated the Button links to #documents. See the screenshot. It's a little bit unusual, that the links are all underneath each other.
Have a look at these 3 Buttons in the page. They all still link to #dokumente, so the translation did not work.

In other pages these translations did work, specially in Product pages.

This is our main Problem. If you like, I can give you access to this site, as it is a copy of our real site hidden link.

Bildschirmfoto 2025-06-03 um 16.10.29.png
June 3, 2025 at 3:33 pm #17103177

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hi Frank,

Thanks for the detailed explanation.

I think the root cause of the problem is how the link is added in the original page.

In your staging site, in the translation editor only appears the anchor, not the full link. I think this is why it's not working. In the Sandbox site I've provided, in the editor I was able to translate link with anchor at once.

Can you please edit the original page and make sure that the link is "hardcoded". I mean, don't use relative paths nor dynamic links. Include the link to the whole page including the anchor. Then Edit the translation and translate the URL and the anchor (both should appear together in the same field).

If this does not help:
I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue.
It would be better to a testing site where the issue is replicated.

The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I'll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site.
This will allow me to create a copy of your site and your content.
Once the problem is resolved I will delete the local site.

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

Best Regards,
Otto

June 4, 2025 at 8:49 am #17105338

frankG-4

Hi Otto, thanks for this explanation. This helps and we will solve our Broken Links with full path.
The Problem is, that these links were working before and one of the latest updates of WPML "destroyed" it.

But as we now know how to solve this, we will go this way.

Thank you for this clarification. Frank

June 4, 2025 at 9:41 am #17105601

frankG-4

Sorry Otto, I have to reopen the ticket. There is a new Problem. I just wanted to fix the links with anchor and all works fine in DE, EN, FR, but in Spanish translation I do not see the Button Link>URL. I just tested in your demo sandbox and there even is no LINK>URL. Please have a look.

June 4, 2025 at 1:12 pm #17106517

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I fixed the issue in the Sandbox site, doing the following:
- I completed the Spanish translation as it was (without the link)
- Made small change in the original page (added a . in the title)
- This triggered the "needs update" status for the translation
- I edited the translation again, and this time the link appeared

You can see it working here:
hidden link

This may happen if the translation job was already created before applying the XML config.

Can you try it on your end?

Best Regards,
Otto

June 4, 2025 at 1:55 pm #17106833

frankG-4

Great, this works. it must have to do with unfinished ES translations - does not have anything to do with the XML config. Button was edited a few Month ago. But anyhow. It is working now.

Thank you very much.