@collaborato
I got it ! The motto of Artisteer development team should be : “Why making things simple when we can make them complex !”. Almost 400 lines of code when WordPress allows you to create a menu with only one line !
First I needed to make some code modifications to Polylang that will be included in 0.7.2. You can try it before the release by downloading the current development version.
Second, you need to modify the Artisteer code again. Everything is in the file library/navigation.php. The goal is to setup the ‘wp_nav_menu_items’ filter in the correct way.
At line 21, replace:
return theme_get_list_menu($args);
by
return theme_get_list_menu($args + array('theme_location' => key(get_nav_menu_locations()))); // adds a missing argument to wp_nav_menu_items filter
At line 98, replace:
$items = apply_filters('wp_nav_menu_items', $items, $args);
by
//$items = apply_filters('wp_nav_menu_items', $items, $args); // wrong place to call this filter which must be called *inside* the <ul> tags
At line 319, just before:
if (theme_is_empty_html($output)) return '';
Add:
$output = apply_filters('wp_nav_menu_items', $output, (object)$args); // the filter must be called inside the <ul> tags and with $args supplied as an object
Thus, the custom menu should work and you should be able to add the language switcher to it.