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 them 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.
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.
Glad that you found a hack! 😉
Hi,
I am also using Polylang and WPtouch and have the same problem as you guys and have two languages on my site.
Could you be so kind Michael to explain me in detail the step two. Which file should I open to see the html code of the menu and where to put it then?
Thanks in advance.