• I have tested the free version of WPtouch and overall I was very pleased with it. So now I am considering to purchase the pro version.

    Yet there is still one problem:
    I also use Polylang for my website (currently English/German) and in my tests so far everything worked quite well except the main menu. In the WPtouch settings I can select a menu to use as the main menu, but it does not change with the language switch (although the actual content does as expected.

    So my question is: Does anyone use WPtouch and Polylang (or maybe also WPML) and has figured out how to make the menu work in multiple languages?

    I wrote an email to the pro support at WPtouch but haven’t received any reply for about two weeks now. I guess they consider my request as a support request, which is only available for registered users of the pro version, even though I explained in my email, that I just want to figure out whether there is a solution for my question, before I pay for the pro version.

    Any help appreciated.

    https://wordpress.org/plugins/wptouch/

Viewing 5 replies - 1 through 5 (of 5 total)
  • > [wptouch menu] does not change with the language
    > switch (although the actual content does …)

    i just wanted to register my interest in this same question. thanks for testing this and bringing it up!

    — wpwalker

    Thread Starter michael1171

    (@michael1171)

    Here’s what I got so far from WPtouch Pro support:

    “WPtouch Pro currently only includes official support for WPML. What we can do is add this to the list of feature requests to consider for a later release. Looking back, there haven’t been other support requests for Polylang. So we hadn’t seen this reported before. So thank you for letting us know and for helping make WPtouch Pro even better. WPtouch Pro’s developers will consider the feature in a later release.”

    After I begged to look into it, I got this:

    Martin [apparently one of the developers] took a look at this and some noticeable differences between WPML and Polylang are that:

    “WPML stores translations as part of the post (presumably post meta), Polylang is a lot cruder, storing translations as separate pages & posts (with different URLs!) and simply recording a cross-reference between them.”

    “The first issue is easy enough to diagnose: they’ve probably got WPtouch set to use “WordPress Pages” for the menu, which obviously just dumps everything out

    Unlike WPML, which switches the contents of the menu items for the language you’re using, Polylang requires that you manually maintain separate menus for each language. We would have to completely rewrite sections of our menu module to allow customers to pick which menu is for which language. [Which is not in our current future plans.]”

    So probably better stay away from either WPtouch or Polylang if you wanna run a multilingual WordPress site.

    Thread Starter michael1171

    (@michael1171)

    I found a solution, but it is neither very sophisticated nor very elegant. It works though.

    What I did (I currently have a German and English version):

    1. I created the German and the English mobile menu in WordPress.

    2. I selected the German menu as primary menu in WPtouch settings. Then opened the mobile page, opened page source code of the rendered page and copied the html-code of the menu (“<ul class="menu-tree parent-links"><li class="menu-item ........./li></ul>“) to an empty text file.

    3. Same as step 2 with the English menu.

    4. I edited the header-bottom.php file in the WPtouch child theme:

    Commented out line 3

    <?php /* if ( wptouch_has_menu( 'primary_menu' ) ) { wptouch_show_menu( 'primary_menu' ); } */ ?>

    and added instead

    <?php if('de' == pll_current_language()) { ?>
    "THE COPIED GERMAN HTML CODE"
    <?php } else { ?>
    "THE COPIED ENGLISH HTML CODE"
    <?php } ?>

    Now the menus are hardcoded into the template. If you want to change/update the menus you have to follow the above steps again, which in my case takes less than five minutes and my menus won’t change very often.

    Thread Starter michael1171

    (@michael1171)

    Just for the record the reply from WProuch Pro support on my workaround (nice guys)

    Hi Michael,

    As you have identified, manually adding menus with conditional display based on the active language is an option. We are generally reluctant to provide customers with solutions that rely on such hard-coded output, as it can tend to cause problems in future should they choose to update their normally dynamic content (e.g., menus).

    That said, thank you very much for your feedback.

    Thread Starter michael1171

    (@michael1171)

    That’s the pro support (in case you wanna pay for it)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WPtouch and Polylang’ is closed to new replies.