WordPress.org

Forums

qTranslate
Translation of media description (and caption) fields (7 posts)

  1. BenderLV
    Member
    Posted 1 year 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.

    https://wordpress.org/plugins/qtranslate/

  2. redsoulwarrior
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  4. precords
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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 }
  6. macmonster
    Member
    Posted 9 months ago #

    Hi. DO you happen to know the code or how to direct to multilingual links under button text (in widget)? Although I can change button text languages, I can't put two links under url blank. please help

  7. redsoulwarrior
    Member
    Posted 9 months ago #

    I recommend using polylang. It's a plug-in that allows you to define whether to show a widget for any given language or not. This way, you can create custom widgets for each and every language on your blog.

    If that's not what you were asking, try rephrasing the question. It was a little hard to make out for me.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • qTranslate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.