• Resolved Teemu Suoranta

    (@teemusuoranta)


    Hi!

    I have found a bug with following setup:
    – Latest WP and Polylang
    – Media translations enabled

    When I create a post where language is for example English and create a translation to this language by clicking plus icon the language in media library stays in English. This means that when I’m picking images to my translated post, Add Media offers me images that are in English instead of my translation language (the bug).

    This happens only when creating a new translation. When editing translation the language in Add Media is the same as the article’s and not depended of what language is set at admin bar (which is correct).

    There is a quite simple fix to this. By adding correct language to links.php in get_new_post_translation_link function. You’ll need to add ‘lang’ => $language->slug to args (not in attachments). That makes add new translation link to have for example $lang=zh which forces the media library to show images in right language.

    This is more of a proposition than question. If the logic can’t be added I hoped there would be a filter that would let me add this argument there optionally.

    https://www.ads-software.com/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    It should work as you expect. It is however possible that it di not work correctly in v1.7.10 as I wrongly suppress the language for auto-draft in this version. It’s back in v1.7.11. So please tell me if you still have the problem with the latest version.

    Thread Starter Teemu Suoranta

    (@teemusuoranta)

    Hi!

    That did it. It’s working now as expected. Thank you for quick response!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add media language mismatch when creating a translation’ is closed to new replies.