Reputation: 51
im trying to set different languages in the caption place but i looks impossible to make it work. I tried putting in the caption:
but when i print it, it would just make a display like this:
[:en] English text [:de] Deutsch text
Deutsch text
So in the first case, it doesn't interprets the shortcode of qtranslate and in the second case it just removes it.
When calling the galley (im using SexyCycle) i call it this way in the post:
<div class="centerColumn col gu3"> <?php print_custom_field('gallery:do_shortcode'); ?> </div>
Then, in the plugin i have this:
if ($caption == 'caption' && trim($attachment->post_excerpt)) {
echo $attachment->post_excerpt;
$ret .= "<{$captiontag} class='gallery-caption'>" . wptexturize( $attachment->post_excerpt) . "</{$captiontag}>";
}
else if ($caption == 'desc' && trim($attachment->post_content)) {
$ret .= "<{$captiontag} class='gallery-caption'>" . wptexturize($attachment->post_content) . "</{$captiontag}>";
}
any suggestions? Thanks!
Upvotes: 0
Views: 1874
Reputation: 31
I created a simple fix that allows you to select the language for multimedia files using Wordpress qTranslate plugin
https://github.com/rafaelcalleja/qTranslateMultimediaLanguage
Upvotes: 2
Reputation: 51
Solved!
I changed
wptexturize( $attachment->post_excerpt)
for
qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($attachment->post_excerpt);
Upvotes: 1