Translate inside php code
-
Hey guys,
I’m trying to translate a template file from the WP Listings plugin. I need to translate the labels inside the PHP code but when I try to use the shortcode it shows up as simple text of both languages.
For example, I need this code:
if ( '' != get_post_meta( $post->ID, '_listing_bedrooms', true ) ) { $listing_meta .= sprintf( '<li class="listing-bedrooms"><span class="label">Beds: </span>%s', get_post_meta( $post->ID, '_listing_bedrooms', true ) ); }To show “Beds: ” in English and show another text in Hebrew, for example (HE).
What do I do?
Thanks!
The topic ‘Translate inside php code’ is closed to new replies.