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