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); $options[] = sprintf('', $k, $k == $locale ? ' selected="selected"' : '', $v); } // global nav $nav_list = array( "/{$locale}/" => 'Mageia', "http://blog.mageia.org/{$locale}" => array( 'el' => 'Ιστολόγιο', 'en' => 'Blog', 'et' => 'Ajaveeb', 'tr' => 'Web Günlüğü', 'ru' => 'Блог' ), '/wiki' => 'Wiki', "/{$locale}/faq/" => array( 'en' => 'FAQ', 'es' => 'Preguntas Frecuentes', 'et' => 'KKK', 'tr' => 'S.S.S.', 'ro' => 'Întrebări frecvente', 'ru' => 'Вики' ), "/{$locale}/donate/" => array( //"http://www.mageia.org/en/donate//{$locale}/" => array( 'de' => 'Spenden', 'el' => 'Δωρεές', 'en' => 'Donations', 'es' => 'Donaciones', 'et' => 'Annetused', 'fr' => 'Dons', 'tr' => 'Bağışlar', 'ro' => 'Donații', 'ru' => 'Пожертвования' ), "http://mageia.org/wiki/doku.php?id=press" => array( 'de' => 'Presse', 'el' => 'Τύπος', 'en' => 'Press', 'es' => 'Prensa', 'et' => 'Ajakirjandus', 'fr' => 'Presse', 'ro' => 'Presă', 'ru' => 'Пресса', 'tr' => 'Basın' ), "/{$locale}/about/values/" => array( 'de' => 'Werte', 'el' => 'Αξίες', 'en' => 'Values', 'es' => 'Valores', 'et' => 'Väärtused', 'fr' => 'Valeurs', 'tr' => 'Değerler', 'ro' => 'Valori', 'ru' => 'Цели' ), "/{$locale}/about/code-of-conduct/" => array( 'de' => 'Verhaltenskodex', 'el' => 'Κώδικας συμπεριφοράς', 'en' => 'Code of Conduct', 'es' => 'Código de Conducta', 'et' => 'Käitumisjuhised', 'fr' => 'Code de conduite', 'tr' => 'Temel İlkeler', 'ro' => 'Codul de conduită', 'ru' => 'Кодекс поведения' ) ); $list_menu = array(); foreach ($nav_list as $k => $v) { if (is_array($v)) $title = array_key_exists($locale, $v) ? $v[$locale] : $v['en']; else $title = $v; $list_menu[] = sprintf('%s', $k, $k == $sru ? ' class="sel"' : '', $title); } echo sprintf(' H; /* echo sprintf('

%s

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