WordPress.org

Forums

qTranslate
Show qtranslate in the menu (3 posts)

  1. tekilalemon
    Member
    Posted 1 year ago #

    Hi, I would like to use this plugin to show the languages avaliables in the menu. Like a widget but in the menu. Something like this:

    http://www.lepetithotelsantander.com/

    Is this posible in any way? Or maybe you can consider it like a future option :)

    http://wordpress.org/plugins/qtranslate/

  2. etiennesky
    Member
    Posted 1 year ago #

    I did the following, using the twentytewlve theme

    Basically you call the qtrans_generateLanguageSelectCode() function.

    //wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) );
    $html = wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'echo'=>'0' ) );
    $html = preg_replace("/<\/ul>/", "<li style='float: right; margin-top:15px; margin-right: -15px' >".qtrans_generateLanguageSelectCode('image', '', true)."</li></ul>", $html, 1);
    echo $html;
  3. Ajisai
    Member
    Posted 1 year ago #

    Hey etiennesky,

    Where do you put thse lines of code please?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.