Support » Plugin: Media Library Assistant » Shortcode doesn't work on multilingual website?

  • Resolved Nicholas



    I’m using the following shortcode to display some data on one of my website’s pages:

    [mla_gallery columns=1 post_parent=all link=file post_mime_type=all mla_margin=0 mla_link_text mla_style=simple-data mla_markup=simple-data attachment_tag=rtm]

    The website is multilingual using Polylang, and while this code is totally functional on “English” pages, when I paste the exact same shortcode into a “French” page, the gallery doesn’t display at all.

    Not sure why this is, any help would be appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren


    Thanks for your question. I downloaded and installed the Polylang plugin (version 1.0.2) and did some testing (WordPress v3.5.1). I found a number of problems when Polylang was activated:

    • The Attachments column in the taxonomy edit screens is blank. It looks like Polylang is calling the column filter one extra time for each language defined, but not copying the result back into the column contents.
    • As you reported, gallery output disappears from the posts in non-default languages. NOTE: This happens even for the WordPress [gallery] shortcode, not just the [mla_gallery] shortcode.
    • When you edit a post in a non-default language and then click the “Add Media” button, the WordPress Media Manager shows an empty Media Library.

    Only the first problem is specific to MLA; the other two are issues with core WordPress functions. I tried deactivating MLA, and the two WordPress problems remained. Deactivating the Polylang plugin made all three problems go away.

    You can do your own testing to see if you experience the two WordPress problems when Polylang is active. If you don’t have these problems, let me know; maybe I didn’t set up Polylang correctly.

    My testing so far shows some problems with Polylang, but nothing specific to the Media Library Assistant. If you can reproduce the WordPress-specific problems, I suggest you work with the Polylang author to resolve them.

    I am going to mark this issue Resolved for now. If you have any other issues or information, please re-open this topic and give me an update.

    Thanks for using the Media Library Assistant.

    Hi David,

    Thanks for the detailed and prompt response. It turns out Polylang was looking for translations of the media gallery I created, and since the media was unilingual, it printed nothing. Deactivating this feature (“languages and translations for media”) under Polylang settings, resolves the issue both for [gallery] and [mla_gallery] shortcodes.

    I will forward the other issues to Polylang’s developer.

    Plugin Author David Lingren



    Thanks for the update and for the tip about deactivating languages and translations for media. If any other problems come up, let me know.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode doesn't work on multilingual website?’ is closed to new replies.