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.
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.
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02: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.
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02: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 🙂
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.
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.
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02: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?
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.
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02: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.
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.
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02: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/
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.