[resolved] Menu is switched always back to inital (DE) - regardless which default language (6 posts)

  1. Robert Lemm
    Posted 2 years ago #

    Hi Chouby,

    first of all thanks for that pretty straight forward multi-language-plugin. I installed it yesterday and set up my site, having now two menus for de (German) and en (English) implementet, some of the pages and articles already translated, all tags and categories also.

    Here the link to my Website to see how it looks so far.

    Everything works fine as long as you are on a page and click to the other flag in the menu. That page stitches to the other language. The menu is switched as well, but it's out of focus if you hover the items. It will always switch back do German.

    The automatic language detection is functioning for the homepage, so when you have en (English) here that's fine, but then if you click somewhere else you are back to German.

    Any chance to fix that?

    I'm using Cell as template.

    My settings for polylang are the following:

      2 languages de(1)ennd en(2)
      2 assigned menus menu_de and menu_en
      Switch at the end of the menu as flag, no text, current language suppressed
      detect browser language is set active
      no URL changes
      synchronizing active

    Looking very forward to any tip or trick or changes I have to use to get this final thing done :-)

    Thank you very much in advance!


  2. Robert Lemm
    Posted 2 years ago #

    This is the code used by the template btw.:

     * Primary Menu Template
     * Displays the Primary Menu if it has active menu items.
     * @package Cell
     * @subpackage Template
    if ( has_nav_menu( 'primary' ) ) : ?>
    	<?php do_atomic( 'before_menu_primary' ); // cell_before_menu_primary ?>
    	<nav id="menu-primary" class="menu-container">
    		<?php do_atomic( 'open_menu_primary' ); // cell_open_menu_primary ?>
    		<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'menu', 'menu_class' => '', 'menu_id' => 'menu-primary-items', 'fallback_cb' => '' ) ); ?>
    		<?php do_atomic( 'close_menu_primary' ); // cell_close_menu_primary ?>
    	</nav><!-- #menu-primary .menu-container -->
    	<?php do_atomic( 'after_menu_primary' ); // cell_after_menu_primary ?>
    <?php endif; ?>
  3. Chouby
    Plugin Author

    Posted 2 years ago #

    Have you the same problem with a default theme such as twenty twelve?

  4. Robert Lemm
    Posted 2 years ago #

    Yes, with twenty twelve the issue is the same.

  5. Chouby
    Plugin Author

    Posted 2 years ago #

    Could you for a plugin conflict? Deactivate all of them except Polylang and then look if the problem. If not, re-activate them one by one to find whichone conflicts.

  6. Robert Lemm
    Posted 2 years ago #

    Chouby, I guess I fixed it. I deleted the English menu and set it up a second time. What I encountered was the following: the first English menu had some attribute "former name" set to the German page for that menu item and that was probably pulled while you hovered above the displyed menu item in English. A little strange but now it's working fine. Changed this a few minutes before I'm writing this. Topic resolved so far. Thanks for taking care.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Polylang
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic