$page_lang = array_search($page->gp_index, $list);
        if (!$page_lang) {
            return $menu;
        }
        //if it's the default language, we don't need to change the menu
        // ... if the menu isn't actually in the primary language, we still want to translate it
        //if( $page_lang == $this->lang ){
        //	return $menu;
        //}
        //if we can determine the language of the current page, then we can translate the menu
        $new_menu = array();
        foreach ($menu as $key => $value) {
            $list = $this->GetList($key);
            if (!isset($list[$page_lang])) {
                if (!isset($new_menu[$key])) {
                    $new_menu[$key] = $value;
                }
                continue;
            }
            $new_key = $list[$page_lang];
            if (!isset($new_menu[$new_key])) {
                $new_menu[$new_key] = $value;
            }
        }
        return $new_menu;
    }
}
//for backwards compat
global $ml_object;
$ml_object = MultiLang::GetObject();