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.

Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 7 replies, has 2 voices.

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

Assisted by: Waqas Bin Hasan.

Author Posts
September 4, 2024 at 1:25 pm

wouterS-4

Background of the issue:
I am trying to ensure that internal links in ACF fields in blog posts on my WordPress/Elementor site are automatically translated. Currently, links in translated content (NL) are pointing to the original language (EN). I have tried translating link targets again in settings, added custom XML, and tested with only WPML, String Translation, ACF, and ACFML plugins with a default WP theme like 2024, but without success. It only works when I manually edit the link in the Advanced Editor. Example page: hidden link

Symptoms:
Internal links in translated content are pointing to the original language instead of the translated language.

Questions:
Why are internal links in ACF fields not automatically translating?
How can I ensure that links in translated content point to the correct language without manually edit all of them?

September 4, 2024 at 1:57 pm
September 5, 2024 at 7:33 am #16143363

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation. I am working on this and 'll get back to you as soon as I find something or have a solution.

September 5, 2024 at 1:08 pm #16145185

Waqas Bin Hasan
Supporter

Languages: English (English )

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

I am still working on this and 'll get back to you as soon as I find something or have a solution.

September 6, 2024 at 9:04 am #16147854

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation. I was able to reproduce the issue in a fresh test site.

The issue happens when Use directory for default language in WPML → Languages → Language URL format → Different languages in directories is turned on. While it doesn't happen if you don't use that option.

I've escalated the issue to our 2nd tier team for more investigation and 'll get back to you accordingly.

Have a great weekend in the meanwhile 🙂

September 9, 2024 at 5:07 am #16153432

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation.

I just wanted to update you that the issue has been escalated to our dev team and in the meanwhile you 'll need to manually fix the links to point to the correct targets, by updating translations manually.

I'll update you as soon as there's a temporary fix or workaround available or if a fix is released.

September 9, 2024 at 11:58 am #16156005

wouterS-4

Hi, dont you think a workaround van be to disable the 'Use directory for default language'. The re-save all translation links via 'Translate Link Targets'. And then re-enable 'Use directory for default language' to create correct /en/ urls for the orginal language again?

September 9, 2024 at 1:33 pm #16156779

wouterS-4

Hi, I now tested on a new staging domain with the option 'Use directory for default language' turned off.
1. I translated link targets again. No success.
2. I added an internal link on a new page without the /en/ directory (hidden link)
Again the Dutch link was not translated. (hidden link) Therefore I am not sure if it really is the default-language-in-directory causing the issue?

September 9, 2024 at 2:26 pm #16157143

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for the updates.

I mean that meanwhile you 'll need to manually fix the links to point to the correct targets, by updating translations manually.

It doesn't mean that you need to change the "Use directory for default language" option. All I meant was that until I get more information or a proper solution, you 'll have to edit translations manually and in ATE, translate these links manually.