php - Translate content on attachment pages – what am I missing? -


i want use qtranslate-translation on this page on other names of "previous" , "next" links. somehow doesn't work , hours have tried figure out why...

it should use either german or english words depending on chosen language – on other language. in settings of qtranslate "attachments" checked translation.

it somehow recognises tags, way doesn't display whole thing string, 2 words next each other.

maybe eagle's eyes? thanks!

... <?php if (have_posts()) : ?>  <?php while (have_posts()) : the_post(); ?>      <div class="grid_12 exhibition-views">          <div class="navigation">             <div class="previous">                 <?php                      _e("[:en]".previous_image_link(0,'previous')."[:de]".previous_image_link(0,'zurück')."[:]");                 ?>             </div>             <div class="next">                 <?php                      _e("[:en]".next_image_link(0,'next')."[:de]".next_image_link(0,'weiter')."[:]");                 ?>             </div>         </div>          <?php echo wp_get_attachment_image( $post->id, 'large' ); ?>          <!-- <div class="caption">< ?php if ( !empty($post->post_excerpt) ) the_excerpt(); ? ></div> -->      </div>  <?php endwhile; ?> ... 

judging code, you're expecting next_image_link return string. doesn't - echos link. see the source - next_image_link calls adjacent_image_link, echo on line 2658.

how doing:

next_image_link(0,__('[:en]next[:de]weiter[:]')); 

instead?


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -