Skip to content Skip to sidebar

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.

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: America/Lima (GMT-05:00)

This topic contains 8 replies, has 2 voices.

Last updated by Andreas W. 1 year, 11 months ago.

Assisted by: Andreas W..

Author Posts
November 29, 2023 at 1:07 pm #14951397

Sabra

Hi and thanks for a great translation tool! I am having an issue with PDF media translation. The website internationalbluecross.org is originally in English and is translated into German and French. It has a documents section where you can download PDF documents. An example of such a page is: hidden link
I have used the media translation editor to translate the image on this page and it works perfectly. Now I have uploaded the translations for the English documents directly into the Media Translation tool however the documents do not appear under the links on the pages nor do they appear in the WordPress media library. I have tried deleting and adding the original documents to the page again and this also did not solve the problem. I am wondering whether all media items in the WordPress media library should be in the original language and all translated media be uploaded directly into the wpml media translation tool. I am seeing originals in all three languages in the wpml translation tool and I'm not sure what I'm doing wrong and hope you can help me.

November 30, 2023 at 3:11 am #14957325

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Hello,

If you see different source languages for your media on WPML > Media Translation, then this might happen, because you upload media in different languages directly into the media library by switching the language inside the top admin bar or by directly uploading the media on a translated content on the WordPress Editor or a Page Builder.

Usually, all media on WPML > Media Translation should be assigned to site's default language and if you need to replace a media file in a second language, then you need to upload it on WPML > Media as a translation.

Once you do this, the WPML Media Plugin will create an entry inside the media library for the specific admin language.

In most cases, this should do the trick already and your alternative media file will show up in a second language.

Only in some cases, it might be that the media source URL will need to get translated manually while translating the content with the WPML Translation Editor.

Please give this a try and let me know if further assistance is needed.

Best regards
Andreas

December 5, 2023 at 9:07 am #14994423

Sabra

Hi Andreas,
Thanks so much for your help with the issue I am having. I have gone up into my media library and it seems that all media has been duplicated into the other two languages (perhaps so that the items available for all the languages?). I tried to change the wpml media translation settings to be able to "set language information for existing media" but this possibility was greyed out. I will try to create the pages again in English and Translate them once more adding the necessary translated media items directly through the media translation plugin and see if this resolves the issue. Is there any way to be able to clean up the media library and assign the original English language to all the items uploaded to the library?

Screenshot 2023-12-04 at 17.01.34.png
December 5, 2023 at 10:54 am #14995755

Sabra

Hi Andreas
I recreated the downloads page here: hidden link and I removed all the annual report pdf files in all languages from the media library. Afterwards I uploaded the PDF annual reports in English, making sure that I was in the English site as I did this. I then added the translated pdfs in German and French using the media translation. Only then did I add the links to the English page. I then translated the page using wpml but the pdfs still open up in the original language. Am I doing something wrong? I appreciate your help with this.

December 5, 2023 at 2:11 pm #14998843

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Hello,

It is expected that there one media entry in each language inside the media library, as otherwise, no images will show up in the second language.

Anyhow, I am sorry to hear that applying a different PDF per language with WPML Media still does not work as expected on your site.

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again.

If you are unable to provide such a copy of the site for testing, please let me know on this ticket.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

December 6, 2023 at 11:14 pm #15012591

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

If you open the Advanced Translation Editor you will see that the source URLs for those PDFs are actually getting translated and as long you do not replace the translated URL with the correct URL for the alternative PDF, this will not work as expected.

Go to your media library, switch the language in the top admin bar and you will find the source URL for your PDFs in each language.

Then adjust the translations.

url.png
December 9, 2023 at 3:49 pm #15029547

Sabra

Hi Andreas and thank you so much for looking into this and for your wonderful support. I managed to do as you said and the page is working now. What I find interesting and can't exactly explain is that when using the Divi Text block, it is necessary to put in the urls by hand as you explained to me. When I did the same thing for the French translation of this page which uses the Divi Blurb Module: hidden link
this extra step was unnecessary and the links were translated automatically. In fact, when I tried to go to this page and try to use the translator, I was unable to access the urls to translate them. Perhaps this is because in the blurb module (as opposed to the text module) the link is set differently. I will try to recreate the Annual Reports page using blurbs and see whether this automatic linking works which would save a lot of time and effort when adding many files. I hope I have explained myself clearly. I thought you might like to know since others might have the same issue when using page builders. Thanks very much for your assistance and you can mark the issue as resolved.

December 11, 2023 at 3:53 pm #15039149

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

We do usually support internal links automatically, which works for example very well with Gutenberg, but with different page builders, like Divi, the behavior often varies.

It actually might be that you experience this issue only if you use PDF files.

I will need to run a test on a new WordPress install with Divi and WPML to confirm this and then get back to you.

December 12, 2023 at 2:01 am #15041575

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Did you already check on WPML > Media Translation if in the top section of the page a sync dialog is available? If so, please run the dialog and check if this solved the issue.

Take note, that I just made a successful test with a Gutenberg Image Block and a Gutenberg File Block.

Take also note that if you use text or HTML the Media Translation can not replace such links and you will need to translate them yourself, as such links will be available on the Advanced Translation Editor for translation.

If you go to my test post, open the translation, and write "http" in the text search field on the top right, you will see the image source URL which I used inside my HTML Block. This is expected in this case.

Now, as I am not aware of how you created your content, I have created a test site here and installed Divi. Please use this one-click-login and try to recreate the issue that you are experiencing on your site.

hidden link

Leave me a short comment on this ticket once you are done with testing.

The topic ‘[Closed] Problems with PDF media translation’ is closed to new replies.