WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
[resolved] Qtranslate+Custom Menu+Taxnomy (4 posts)

  1. chudoff.a
    Member
    Posted 3 years ago #

    Hi have a problem Qtranslate not change language in nav_menu, only Taxonomy with Page is ok. My Brain is Hack =).

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

  2. chudoff.a
    Member
    Posted 3 years ago #

    it fix a Problem.

    function qtrans_menuitem2( $item ) {
    	foreach ($item as $key=>$values){
    	$item[$key]->title = qtrans_useTermLib($values->title);
    }
    
    qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $item->title );
       return $item;
    }
    add_filter('wp_nav_menu_objects',      'qtrans_menuitem2', 0);
    
    function qtrans_menuitem( $menu_item ) {
       $menu_item->title = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $menu_item->title );
       $menu_item->title = qtrans_useTermLib( $menu_item->title );
       return $menu_item;
    }
    add_filter('wp_setup_nav_menu_item',      'qtrans_menuitem', 0);
  3. Aldi
    Member
    Posted 2 years ago #

    @chudoff.a

    Where do you put this code? Is it in the function.php?

  4. Aldi
    Member
    Posted 2 years ago #

    OK, I put it in function.php.. but this fix doesn't seem to translate the menu in the front-end... Any idea?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags