Internationalization (i18n) comes with a sub module for menu translation which works fine with regular menus and even superfish menus generated by the superfish module (just tested it).

However this theme hardcodes embedded support for superfish menu in its main menu at the top of the page and does not use i18n API for rendering language specific menus on multi-language sites.

I took a look into both the theme's page.tpl.php and into superfish.module and gave it a short try, but I'm not familiar with the module, so it would take a bit longer. Maybe someone or the theme's developer will be more efficient at making what I'm sure is a simple change (passing the menu rendering through i18n's API or even simpler through the superfish.module which already does it).

This is the actual code in the theme's
/sites/all/themes/likable/templates/page.tpl.php

            <div id="main-menu">
                <?php 
              $main_menu_tree = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
              print drupal_render($main_menu_tree);
            ?>
            </div>

This is the code on superfish.module that actually passes the menu rendering through i18n's filtering:

    $cache = array();
    $cache['menu'] = menu_tree_all_data($menu_name);

    if (module_exists('i18n_menu')) {
      $cache['menu'] = i18n_menu_localize_tree($cache['menu']);
    }

Comments

Carlos Miranda Levy’s picture

A work around is to

  • install Variable translation sub module of Variable module.
  • Go to Home » Administration » Configuration » Regional and language » Multilingual settings (/admin/config/regional/i18n/variable)
  • Click on Menu settings
  • Check "Source for the Main Links"
  • Go to Home » Administration » Structure » Menus (admin/structure/menu/settings)

There you will be able to designate separate Main Links and Secondary Links menus for each Language (click on the selected Language at the top of the page.

This solution, by the way, does not use or require the Menu Translation module. It does require to have separate main menus, one for each language the site supports.

youngros’s picture

I have also run into this problem with the menu. Are you able to give a bit more info on how to set up the second language menu. Originally built a site using Bartik and the menu worked fine, now get all the menu items showing for both languages. Thanks.

youngros’s picture

After a bit of trial and error managed to get the two menus working. The only thing that is not working now is when on the home page the menu tab for home is not highlighted the same as it is for other pages.