Home Forums General Issues WPML and Gallery field


WPML and Gallery field

  • Hi,
    I’m using gallery field for a slideshow. Every slides have a title and caption that have to be translated when user changes site languages.
    With WPML Media transaltion plugin I have a duplicate for each images of the the gallery with title/caption translated.
    But what I get is always the title/caption untranslated because when I add image to the gallery field I can’t choose the language.

    Here the code:

    $images = get_field('slideshow', slideshow_id());
    <?php foreach( $images as $image ): ?>
    <div style="background-image: url(<?php echo $image['sizes']['large']; ?>);></div>
    <h2 class="titolo"><?php echo $image['alt']; ?></h2>
    <p><?php echo $image['caption']; ?></p>
    <?php endforeach; ?>

    I’ve tried also this code but it’s the same

    $id = icl_object_id(slideshow_id(), 'page', true);
    $images = get_field('slideshow', $id);

    Some solutions?

  • Hi @donad

    Thanks for the bug report. This compatibility issue has been raised, but no fix has been found.

    Would you please also contact the WPML support and raise this with them?

    One other question. Have you had this same issue when using the image field? Or does the image field work correctly with WPML translations?


  • Hi @elliot
    thanks for answer

    I hope in the future this issue will be solved. Then you confirm that the problem is from WPML and not ACF?

    unfortunately at this time I can’t try what you’re asking me. In case I will tell you

  • Hi @donad

    It would help greatly if you can create an image field and test the issue.


Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘WPML and Gallery field’ is closed to new replies.