I use WordPress 3.8 + Types 1.5.7 + WPML 3.1.5 + WPML Media 2.1.4.
There are two languages, the default language is Chinese(Traditional), and the other is English.
And I have already duplicated images for different languages by using WPML Media
I want to show image title with repeated image field on my custom template, so I use the code as described in http://wp-types.com/forums/topic/image-alt-en-title-from-media-library/
The following is my code to get the image title, which the customers is a repeated image field.
$customers = get_post_meta(get_the_ID(), 'wpcf-customers', false); foreach ($customers as $customer) { $attachment_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid = %s", $customer)); $title = get_the_title($attachment_id); //show image with title }
But it seems get the image title only for the default language, how do I get the title of the image according to current language?
Thank you!
ucheng