Skip Navigation

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

Problem:
The client was experiencing issues with PDF files appearing in the wrong language search results on their multilingual website. They were using Ivory Search to limit search results by language and had uploaded PDFs for specific languages. However, PDFs uploaded for one language were appearing in search results for other languages. Additionally, they were unsure about the best practices for uploading media so that it only appears in the search results for the corresponding language.

Solution:
deactivate the media duplication option, which makes a media file available in all languages when a page is translated. This option can be found in the WPML settings and applies to all media types, including PDFs: https://wpml.org/documentation/getting-started-guide/media-translation/#using-different-images-and-media-across-languages.

We also explained that the search functionality is handled by the theme/plugin and should automatically filter content by language in almost all cases. Make sure that all pages containing the documents are correctly translated and that the PDFs are linked correctly according to the language.

Lastly upload media in the correct language section of the media library (by using the WordPress topbar language switcher) and checking the WPML > Settings > Media translation(plugin) to ensure that media files are not duplicated but translated.
If the solution provided is not relevant due to being outdated or not applicable 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 you still need assistance, please open a new support ticket in our forum: https://wpml.org/forums/forum/english-support/.

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 topic contains 17 replies, has 2 voices.

Last updated by Alejandro 9 months, 3 weeks ago.

Assisted by: Alejandro.

Author Posts
January 11, 2024 at 2:56 pm #15175310

mariannaF-4

Media translation

January 11, 2024 at 4:28 pm #15175863

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hello there!

My colleague mentioned a possible solution to your problem before. can you let me know if you tried it out? it will not delete the content that was already translated, but it will help you with future docs.

Give it a try and let me know if you get stuck or have any questions.

January 11, 2024 at 4:33 pm #15175893

mariannaF-4

The solution that he suggested https://wpml.org/documentation/getting-started-guide/media-translation/#using-different-images-and-media-across-languages didn't work because it seems that it only works on images that are embedded within the page. The media that I'm referring is linked in buttons. Here's a screenshot & link: hidden link

Screenshot 2024-01-11 at 11.33.34 AM.png
January 12, 2024 at 9:18 am #15177939

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Could you give me the steps to recreate the problem? The more details you provide, the faster I'll be able to understand how it works this, how we can solve it 🙂

Regards,

January 12, 2024 at 3:43 pm #15179985

mariannaF-4

Is this meant for me?

January 15, 2024 at 8:26 am #15183537

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Ok here's the thing. I have no idea how those buttons are created.

In my last question I asked for more info about them so I could better understand how to move forward with this .

You mentioned that the problem is with the button icons but how are they created or added to the button? Where do you add them?

If you give me this info, or even create a quick video showing it to me, I'll be able to help you better.

Regards.

January 15, 2024 at 7:30 pm #15186912

mariannaF-4

This is my original question:

I have a question about managing all the media files (PDFs) on our website. We offer a search function using Ivory Search to limit which search results are returned depending on the language that someone is searching in. And, we've uploaded different PDFs depending on the language. One thing we noticed is that sometimes a chinese PDF that was uploaded only to chinese exists within the German and English. I noticed that there are media settings that force a media file to get copied to all the other languages. How should this be handled for our case?

Nothing to do with icons. You can troubleshoot from the front-end of the website.

January 16, 2024 at 8:50 am #15188364

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

And that's why my colleague had told you about the media translation settings.

What you are mentioning is called "media duplication" and it's the process of making the same pdf (in your case) available in all languages.

It duplicates when you translate the page and what my colleague had told you is to deactivate the option found on the link: https://wpml.org/documentation/getting-started-guide/media-translation/#using-different-images-and-media-across-languages

That option is not only for images, also for PDFs.

However, when you said it might not work there, I asked for the steps to recreate the problems which would've helped me go to your site and try to investigate what happened but I never had such steps: https://wpml.org/forums/topic/media-translation-19/#post-15177939

I can't troubleshoot from the website's frontend because I see the buttons (l katalog, LJ katalog, drukbare...) Are they supposed to be only 2 buttons and not 3? Which buttons or links from the buttons are wrong in that page you sent me? There are many there and I have no way of knowing which are wrong or not.

January 23, 2024 at 1:52 am #15213911

mariannaF-4

Here's an explanation of the question.

hidden link

January 23, 2024 at 11:22 am #15215939

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Thanks for the video.

Ok let me explain something to you because it might be important moving forward.

- when you add content, you add it to a post type (pages, posts, portfolio, etc).
- When you run a search on your site, it will either search for all the post types content or the ones of a specific post type. that part is fully handled by your theme.

Now, the languages in WPML are nothing but the same elements of a specific post type that have extra entries in the database: a language info. so the search code from the themes, if used in a standard WordPress way, will automatically filter the content by language as well.

if it appears in english but you're searching in another language then the possibilities are likely the following:

- You need more memory
- The doc doesn't exist in Chinese but only en English
- The content returned from the search doesn't have an english translation
- The content returned from the search is a DUPLICATE in chinese of the english element.

in your video everythiing works well but you mentioned that in chinese you had some elements in english. can you spot which search did you type to get that result?

I tried searching for a few things but i couldn't get the problem that you mention.

-----------

In the meantime i ask you:

- Can you check that all the pages that contain these documents are correctly translated?
- Can you tell me if you manually change the PDF to the correct language according to the translation? and if you do, can you tell me how? maybe you can record a video showing me the workflow.
- Can you tell me if the pages that contain the PDF are translated using the translation editor from WPML or the native editor from WordPress?

Thanks in advance.

January 26, 2024 at 4:57 am #15228614

mariannaF-4

I guess the question is how should they upload media that they only want to be returned using search that corresponds to the language that they uploaded to? What is the best practice for this? The only upload media using the media library. Then they link to those pdf's in the buttons that are all over the site. They've changed those links in the advanced translator. The issue is when searching say "C.070" on the German site, I'm also seeing the English one. What should the settings be in WPML -> Settings -> Media Translation for our case?

(separate case)
Additionally, I used the Media Translation tool for our header to swap out the logo depending on the language and it didn't seem to make any difference. The logo on all languages is in English and we need that changed. Also, I need to be able to change the elements within our Header i.e phone number and links but I cannot do that at all.

January 26, 2024 at 10:01 am #15229369

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Well, i think the best practice here would be to either upload the media in the correct language (as in, load the media for the english language in the english side of the media library, the chinese ones in the chinese side of the library, etc).

they will likely be duplicated into the other languages depending on your settings in WPML > Settings > Media translation but that shouldn't be a problem.

The real factor here is HOW are those PDFs linked on the website and how the search function does the searching because it's this that determines what to do.

Usually a search feature searches content, like pages, posts, etc, not media, and in this case, then, the problem is linked to the pages/posts that the system is searching for and not the media files. This is why i asked about this before.

Regards.

January 26, 2024 at 2:13 pm #15230485

mariannaF-4

why don't you think the duplication in settings will not be a problem?

I am using Ivory Search plugin and it allows search results to show media files. If you search C.070 on the German site, you can see one of the results is the english version of that pdf. Did that happen because of the duplication process that occurs?

The only way that these PDFs are being linked to pages is in the screenshots.

Screenshot 2024-01-26 at 9.12.01 AM.png
Screenshot 2024-01-26 at 9.12.20 AM.png
January 29, 2024 at 11:16 am #15237592

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

I'm not ure why my last message was never sent but this is what i had written:

Because the problem is usually not with the file, it's with the filtering system that decides which language to show and what to show. that's why i don't think that the media duplication feature could be a problem here. if that ivory search plugin searches through the media files and not via pages, posts, etc for those files, then the media duplication is definitely an important factor.

Please check this video out: hidden link

This is what i see and from what i understand, if i search for something, the reults will also contain the media files which is something usual search engines do not do. in this case media translation seems to be key here so you have 1 media, correctly translated in the different languages: https://wpml.org/documentation/getting-started-guide/media-translation/

however you mentioned before the following: https://wpml.org/forums/topic/media-translation-19/#post-15175893

which in this case makes no sense to me in this last scenario, since we're not talking of changing the link on the button at all but making the PDFs visible or not only in some languages via the search bar, which is totally different from the button issue that you mention.

so i suppose at this point we have 2 problems:

- The links in the buttons could be incorrect
- The search bar results show files that shouldn't be there

If that's the case, then we have to fix 2 problems, not 1 and they are 2 different problems altogether.

we can start with the search bar issue and then move on to another problem if you want. i'd kindly request access to your site via the fields i have enabled for that purpose so i can check why is the problem occurring and how you can solve it.

February 2, 2024 at 6:11 pm #15260731

mariannaF-4

You should have access now.