• toninoole

    (@toninoolegmailcom)


    Hi!
    I want to put a language switcher in my menu. I create a new menu and y put everything that I need but I don’t know how to add this (or something like that):

    <?php if(qtrans_getLanguage()=='en'): ?>
       <a href="<?php echo qtrans_convertURL('http://'.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"], 'it'); ?>">Vedere in italiano</a>
    <?php endif; ?>
    <?php if(qtrans_getLanguage()=='it'): ?>
       <a href="<?php echo qtrans_convertURL('http://'.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"], 'en'); ?>">See it in English</a>
    <?php endif; ?>

    I’m using qTranslate plugin. I read about wp_nav_menu() function, but I don’t where exactly I have to modificate.

    Sorry for my english-

  • The topic ‘How to add language switcher in menu’ is closed to new replies.