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 thread is resolved. Here is a description of the problem and solution.

Problem: media translation not working for PDFs Solution: The client found PDF url in the String Translation and resolved it.

0% of people find this useful.

This topic contains 6 replies, has 2 voices.

Last updated by robinM-14 5 months, 1 week ago.

Assigned support staff: Bruno Kos.

Author Posts
May 14, 2019 at 7:51 am #3804443

robinM-14

I am trying to have two different data sheet PDF files for each translation (German, English). I have uploaded the files within the media translation menu and have also updated the database afterwards (full, slow progress), but however it will still display the German data sheet when clicking on the link of the English page

The code of the link looks like this:
<a href="hidden link" target="_blank" rel="noopener noreferrer">Datenblatt hd C7CX</a>

and with the advanced translator I´ve only translated the text "Datenblatt hd C7CX" to "data sheet hd C7CX"

Your advise is much appreciated.

With kind regards,
Robin

May 14, 2019 at 9:28 am #3805177

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

It seems like that EN image you posted is the same as DE - can you upload an updated version with the correct /en/ domain?

Regards,
Bruno Kos

May 14, 2019 at 9:38 am #3805227

robinM-14

Dear Bruno,

Thanks for getting back to me so fast!

Sorry, please find the correct pics again in attachment.

Regards,
Robin

May 14, 2019 at 10:20 am #3805713

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Not always is WPML able to penetrate through post content (if various page builders are used) and thus changing URLs (if any type of media has been translated using Media Translation). I've created a sample page using Gutenberg and it did not update the URL, however I checked database and it was there where I could change it. Have you tried checking database for that exact URL and edit it based on the page/post ID, but for the translated ID?

Another way is to open the original page and change the language of the page using the language switcher and editing the page directly.

and have also updated the database afterwards (full, slow progress)

Perhaps you targeted original page ID and not the translated one?

Regards,
Bruno Kos

May 14, 2019 at 1:04 pm #3807003

robinM-14

Dear Bruno,

I´m sorry but I don´t get what you mean.

As far as I understood the media translation it should be possible to have one object of media "datasheet" and depending on the selected language it will display the corresponding linked file either "datasheet DE" or "datasheet EN".

As you can see in my 3rd picture (media files) the references are correct. It should be possible to get this basic function working without digging into the database manually. If so, I´d need to track all media uploads again manually, with knowing the exact link urls, upload dates etc. making the media translation function useless...

Moreover, if I try to manually update the references (as suggested) directly in the editor, I get the warning message from the translation menu.

Please advise. Thanks!

May 14, 2019 at 2:22 pm #3808017

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Moreover, if I try to manually update the references (as suggested) directly in the editor, I get the warning message from the translation menu.

This is what would happen on this page:
https://wpml.org/documentation/translating-your-contents/how-wpml-keeps-track-of-your-translations/

So all translations you did so far would remain and you wouldn't lose them, but you would translate future translations manually, as WPML would not connect them any more. If there aren't many affected pages, this would be surely the fastest way to remedy this.

There are some other things to try also:
https://wpml.org/forums/topic/media-are-not-exchanged-in-the-other-language/

So search within String Translation if those URLs are available there. There was also this thread:
https://wpml.org/forums/topic/video-related-pdf-are-not-saved-in-second-language/#post-1061184

Where PDFs did not have their URLs to be set for translations.

As for the MT itself, there are compatibility issues as various page builders store data in different ways and it is difficult for WPLM to decode this content and update URLs. Some store it even in base64, some generate their own meta data and not all of them keep the clean URLs for WPML to simply overwrite upon setting up a translation of media file.

According to your image, you have used Fusion Builder to put those links, correct?

Regards,
Bruno Kos

May 14, 2019 at 5:04 pm #3809337

robinM-14

My issue is resolved with the String Translation Feature. Thank you!