Ready to get started?Download WordPress


Translation of media description (and caption) fields (5 posts)

  1. BenderLV
    Posted 4 months ago #

    Is there any workaround to enable trasnlations in media (images) description and caption fields?
    I've tried using both methods <!--:en--> and [:en], but no luck. If I add image to gallery, the qtrasnlate doesn't "pickup" shortcode and all texts apperas in one row for all languages.
    Of course, there are no problems to add any text on single image as they are added manually for each language version.


  2. redsoulwarrior
    Posted 4 months ago #

    I've run into the same issue on a site I was working with. My fix was to edit the source files of the theme (for posts, it's often single.php) and change the parts where the descriptions have been pulled from the database by adding the qTranslate translation function -> __( $description_image );

    This did the trick. Hope this helps. :)

  3. Ai4President
    Posted 4 months ago #

    had the same problem weeks ago and my solution was nearly the same :
    _e( $description_image );

  4. precords
    Posted 3 months ago #

    Can you please show some sample code here for how you did this. I think I need to change my portfolio.php but not sure how. Do you do this once or where?

    Thanks for any help!

  5. redsoulwarrior
    Posted 3 months ago #

    Hope you can make something out of this:

    if ($thumbnail_image && isset($thumbnail_image[0])) { ?>
       <a href="<?php echo $srcf[0]; ?>" title="<?php echo __($thumbnail_image[0]->post_excerpt); ?>"><img alt="<?php echo __($thumbnail_image[0]->post_excerpt); ?>" src="<?php echo $src[0]; ?>" class="clean-img"/>
    <?php }


You must log in to post.

About this Plugin

About this Topic


No tags yet.