• Hi,

    I’m using Qtranslate on my website with 3 different languages. Everything is working just fine, except for my menu.

    WordPress is generating the menu using <?php get_template_part( ‘primary’, ‘menu’ ); ?>. Now I’d like to remove certain menu items when the user has the language set to English. I’m trying to achieve this by leaving the title and content of the page empty, this will display the menu item as “(Dutch) [page name]”. I need the page to be completely removed from the menu.

    Thanks in advance!
    Lorenzo

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes me too.
    In Language settings for qtranslate theres checkmark for Hide Untranslated Content and it doesnt doesnt work.
    I made In 1Lang Title and left others empty but still pages and posts show up in other languages.

    Do you know PHP?

    First, I would add a class to my <body> naming the selected language, e.g.
    <body class="en"> or
    <body class="de">

    Then you can use CSS to remove selected menu items. Just like this:

    .en li#menu-item-215 { display: none; }
    .de li#menu-item-216 { display: none; }

    How to add a class lang?
    No problem, if you use the parameter option of qTranslate.

    <?php
    $language = $_GET['lang'];
    ?>
    <body class="<?php echo $language; ?>">

    Use Firebug to find out the IDs of your menu items.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: qTranslate] Different menu's on each language’ is closed to new replies.