Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client installed WPML Media Translation and encountered an issue where a button linked to a PDF in the English version of their site does not automatically update to link to the translated PDF when switching languages. The client inquired whether this behavior is expected or if there is a setting that allows the button to dynamically link to the translated PDF.
Solution:
We explained that WPML does not automatically replace media file links within buttons or content, as these links are treated as static content. To resolve this, the client needs to manually update the link in the translated button version to ensure it points to the correct PDF for that language. This can be done if the button is added through the WordPress block editor or a page builder by editing the translated version and updating the link accordingly. Additionally, we suggested checking the how to translate links documentation and specifically the Translate link targets option to see if it might offer a solution, although it may not support PDF links directly.

If this solution does not apply because it is outdated or not relevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

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 7 replies, has 0 voices.

Last updated by Mihai Apetrei 1 month, 1 week ago.

Assisted by: Mihai Apetrei.

Author Posts
February 27, 2025 at 10:22 am #16755144

ericS-63

Hi,

I successfully installed WPML Media Translation, but I have a related follow-up question:

If I add a button with a link to a PDF on the English version of my site and then translate that PDF to another version for a different language, the button still points to the original (EN) PDF instead of the translated one. The link does not update automatically when switching languages.

Is this expected behavior, or is there a setting that ensures the button dynamically links to the translated PDF?

Thanks for your help!

February 27, 2025 at 10:24 am #16755149

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there,

That’s a great question! What’s happening here is that WPML doesn’t automatically replace media file links inside buttons or content, even if a translated version of the file exists. The reason is that links are treated as static content, so unless they’re specifically translated, they will continue pointing to the original file.

That being said, we can definitely make this work. You can manually update the link in the translated button version, ensuring it points to the correct PDF for that language. If the button is added through the WordPress block editor or a page builder, it should be possible to edit the translated version and update the link accordingly.

Looking forward to hearing how it goes.

Mihai Apetrei

February 27, 2025 at 10:19 pm #16758377

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Regarding your reply from the other ticket, can you please let me know what do you mean by: "breaks the WPML Translation Editor mode"?

If you can share a screen recording or some screenshots or explain a bit more, that would help me better understand what you are experiencing.

Thank you.

February 28, 2025 at 2:04 pm #16761152

ericS-63

Yes, please look at this rather long video:
hidden link

February 28, 2025 at 2:09 pm #16761161

ericS-63

Ps. Oh, and I look at the video myself and I think I missed to press "Complete translation" in the end that why the sync was of I guess.

But anyway - is this the only way for to edit the PDF-links or is there a better way to do it - Maybe a another setup with ACF or so?

February 28, 2025 at 8:26 pm #16762724

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hello and welcome back!

WPML offers this feature, but I'm unsure whether it will support PDF links.

You can definitely run a test, and please let me know how it goes. I'm curious to see if it would be a viable alternative for your needs in this situation.

March 1, 2025 at 6:41 am #16763285

ericS-63

Hi!

It doesn’t seem to work, even after switching the ACF settings to expert mode and making all fields translatable—it still doesn’t show up in the editor.

Is switching back and forth the only solution, or do you have any other suggestions?

pdf.png
not showing.png
March 3, 2025 at 3:48 pm #16769883

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hello,

I apologize if I wasn't clear earlier.

I was mainly referring to the option at the bottom of this page: https://wpml.org/faq/how-to-translate-links/#fixing-links-that-point-to-the-wrong-translation.

Specifically, I'm talking about the "Translate link targets" option.

If that option doesn't work, then you will need to update the links manually because here we are dealing with a file URL and not a post/page translation.