0 ? implode('/', $sel) : null; $list_langs = array(); $options = array(); foreach ($langs as $k => $v) { $list_langs[] = sprintf('%s', $page != null ? implode('/', array($k, $page)) : $k, $k == $locale ? ' class="sel"' : '', $v); } // global nav $nav_list = array( "/{$locale}/" => 'Mageia', "http://blog.mageia.org/{$locale}" => 'Blog', '/wiki' => 'Wiki – Join us!', "/{$locale}/faq/" => 'FAQ', "/{$locale}/#contact" => 'IRC, mailing-lists', "http://donate.mageia.org/{$locale}/" => 'Donations', "http://mageia.org/wiki/doku.php?id=press" => 'Press', "/{$locale}/about/values/" => 'Values', "/{$locale}/about/code-of-conduct/" => 'Code of Conduct' ); $list_menu = array(); foreach ($nav_list as $k => $v) { $list_menu[] = sprintf('%s', $k, $k == $sru ? ' class="sel"' : '', $v); } echo sprintf('', implode(' | ', $list_menu)); echo sprintf('

%s

', implode(' | ', $list_langs));