Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a set of links, each with an image - how can I show different links depending on the language selected (using qTranslate) - the images have text on them..

At the moment I show these links using the rotating links widget.

Are there any plugins to help with this? or do I need to resort to PHP?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You can get the current language with qtranslate using the function qtrans_getLanguage(); and then use it like this for conditionally showing content:

    <?php  
        if ( qtrans_getLanguage() == 'en' ) {
          //put your code in here
        }
        elseif ( qtrans_getLanguage() == 'de' ) {
          //put your code in here
        }
    ?>
share|improve this answer
    
OK thanks - no plugins then - roll my own.. –  Guy Bowden Jul 26 '13 at 8:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.