Support » Plugin: Polylang » Polylang makes Media Vanish in library

  • Resolved flobogo

    (@flobogo)


    Hello,

    When Polylang is active all media disappear from library while editing a post in another language than the basic one.

    Example : My first language is French and Polylang handles both English and Italian translations. If I edit a post in English or Italian all media are not available having disappeared from library. No insertion is possible. The solution is to turn off Polylang.

    Hope you can fix this in future corrections.

    Best regards.

    https://wordpress.org/plugins/polylang/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Chrystl

    (@chrystl)

    Hello

    Did you assign to your french media the english and italian translation?
    Polylang adds a filter per language.
    In your french post you can only upload by “Add media” and “Set featured image” french medias. No access to the list of medias translated in other languages.

    If don’t need to translate your media titles, uncheck this option:
    In Languages > Settings tab > Media: “Activate languages and translations for media”.
    And you will access to your entire library by clicking on “Add media” and “Set featured image”.

    Thread Starter flobogo

    (@flobogo)

    Thank you for your response.
    I think this is the right explanation.

    In fact, I have asked for a friend that I help to build his site. I don’t know if he planned the translation of the media. I think we forgot to do this. I look with him in coming days and I will come back to confirm.

    Thread Starter flobogo

    (@flobogo)

    Hi,
    Sorry for staying so late. I can confirm that the problem with library is related to media translation adjustment.

    When I uncheck the “Activate languages and translations for media” option, then I found access to library whatever language editing of the post.
    Against, if we leave this option checked, it is mandatory to translate the media to access to the library in other languages. But this leads to a duplication of media that seems very heavy.
    Finally, I have preferred to uncheck this option.

    Thanks a lot for your help.
    It’s resolved for me

    You wrote: “But this leads to a duplication of media that seems very heavy.”

    Well, it depends on where you look. It will create 3 additional rows per image in the database, not more. You don’t have to upload the photos a second time. You duplicate the information about the image to be able to translate it, but not the image itself.

    The question is: Do you need translated image properties (title, caption, description, alt) or not. If you uncheck the option, all your images will always be presented in the default language.

    If you need translated image properties, then check ‘Media Translation’, goto the Media Library and create the translation for the images, like you would for any other post or page of your site.

    For things to work, you may then need to check synchronization of custom fields as well. Or not.

    I know that this is all confusing. I have been there. The problem lies in how WordPress handles media information. It’s not really a Polylang thing, you have exactly the same problems in WPML.

    If you need translation on media, you could create the translations manually, or program a little helper to at least create dummy translations that you correct over time, one after the other. This is what I did for my image gallery. As a result, I had one gallery in several languages. Adding a photo to the gallery is automatically propagated to all languages.

    I could give you my code, but the way WordPress works, this won’t be a copy-paste solution. Sorry for the bad news, don’t shoot the messenger.

    I’m glad I found at least this explanation of the option ‘Activate languages and translations for media’. It took me hours fooling around why the heck those images didn’t turn up in the translated pages media library.

    Very frustrating. Not a word about this in https://lingotek.atlassian.net/wiki/display/PDOC/WordPress

    I guess this is because it’s a polylang feature, but because you need to install both, it’s not so obvious what belongs to what plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Polylang makes Media Vanish in library’ is closed to new replies.