Translated menu items with menu_build_tree in drupal 7 I'm having an issue with menu item translations with custom rendering of menu tree.

I see all languages displayed at the same time whenever I change the current language. Items have translation set it works if I enable the built-in main menu block but not with my code.

I've tried adding 't($string)' and set 'language' in params; but no luck.

What am I doing wrong here ? 

I have the following code in template.php for my theme : 

function theme_preprocess_page(&amp;$variables) {

    $params = array('max_depth' =&gt; 3, 'language' =&gt; 'fr');
    $menu = menu_build_tree('main-menu', $params);
    $main_menu_tree = menu_build_tree('main-menu', $params);
    $html = '&lt;ul id="dropdown-menu" class="fixed"&gt;';

    if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1)))
        $nodeid = arg(1);

    foreach ($main_menu_tree as $item_menu) {//for each main element
        $isSecondLevel = isset($item_menu['below']) &amp;&amp; !empty($item_menu['below']);
        $active = '';
        if ($item_menu['link']['link_path'] == 'node/' . $nodeid) { $active = 'active';
        }
        if ($isSecondLevel) {
            $html .= '&lt;li&gt;';
        } else {
            $html .= '&lt;li&gt;';
        }

        $html .= '&lt;a class="' . $active . '" href="' . url($item_menu['link']['link_path']) . '"&gt;';
        $html .= $item_menu['link']['link_title'];
        $html .= '&lt;/a&gt;';

        //is there any sub elements to display
        if ($isSecondLevel) {
            $html .= '&lt;ul class="sub-menu"&gt;';

            foreach ($item_menu['below'] as $item_submenu) {//for each sub element
                $isThirdLevel = isset($item_submenu['below']) &amp;&amp; !empty($item_submenu['below']) ? 'main-menu-third_level' : '';

                $html .= '&lt;li&gt;';
                $html .= '&lt;a href="' . url($item_submenu['link']['link_path']) . '"&gt;';

                $html .= t($item_submenu['link']['link_title']);

                $html .= '&lt;/a&gt;';
                $html .= '&lt;/li&gt;';
            }
            $html .= '&lt;/ul&gt;';
        }
        $html .= '&lt;/li&gt;';
    }
    $html .= '&lt;/ul&gt;';
    $variables['main_menu_html'] = $html;
}
Normaly I use i18n_menu_translated_tree function. For example: 

$main_menu_tree = i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu'));