fix
This commit is contained in:
parent
c77448b51c
commit
76930630bd
@ -12,32 +12,24 @@
|
||||
<!-- Right Nav Section -->
|
||||
<ul class="right">
|
||||
<li class="active"><a href="index.php">Home</a></li>
|
||||
<li class="has-dropdown"><a href="exposition.php">The Exhibit</a>
|
||||
<li class="has-dropdown"><a href="exhibition.php">The Exhibit</a>
|
||||
<ul class="dropdown">
|
||||
<li><a href="logiciel-libre.php">What is Free/Libre Software?</a></li>
|
||||
<li><a href="enjeux-du-logiciel-libre.php">What is at stake with Free Software</a></li>
|
||||
<li><a href="logiciel-libre-au-quotidien.php">Free/Libre Software in daily life</a></li>
|
||||
<li><a href="formats-ouverts.php">Open Formats</a></li>
|
||||
<li><a href="logiciels-libres-pour-education.php">The advantages of Free Software in education</a></li>
|
||||
<li><a href="licences-logiciels-libres.php">Free licenses, the legal framework of Free Software</a></li>
|
||||
<li><a href="modeles-libres.php">Beyond Free Software</a></li>
|
||||
<li><a href="a-propos-april-et-expolibre.php">About April and LibreExpo</a></li>
|
||||
<li><a href="free-libre-software.php">What is Free/Libre Software?</a></li>
|
||||
<li><a href="what-is-at-stake-with-free-software.php">What is at stake with Free Software</a></li>
|
||||
<li><a href="free-libre-software-in-daily-life.php">Free/Libre Software in daily life</a></li>
|
||||
<li><a href="open-formats.php">Open Formats</a></li>
|
||||
<li><a href="free-libre-software-in-education.php">The advantages of Free Software in education</a></li>
|
||||
<li><a href="free-licenses.php">Free licenses, the legal framework of Free Software</a></li>
|
||||
<li><a href="beyond-free-software.php">Beyond Free Software</a></li>
|
||||
<li><a href="about-april-and-libreexpo.php">About April and LibreExpo</a></li>
|
||||
</ul></li>
|
||||
<li><a href="telecharger.php">Download</a></li>
|
||||
<li><a href="exposer.php">Exhibit</a></li>
|
||||
<li><a href="download.php">Download</a></li>
|
||||
<li><a href="exhibit.php">Exhibit</a></li>
|
||||
<li><a href="contact.php">Contact</a></li>
|
||||
<li class="has-dropdown"><a href="">Language</a>
|
||||
<ul class="dropdown">
|
||||
<?php foreach ($registered_languages as $lang) { ?>
|
||||
<?php
|
||||
$current_dir= basename (getcwd ());
|
||||
if ($current_dir == "htdocs")
|
||||
$len= 1;
|
||||
else
|
||||
$len= 4;
|
||||
$link= substr_replace ($_SERVER['REQUEST_URI'], $lang['loc'], 0, $len);
|
||||
?>
|
||||
<li><a href="<?php echo $link; ?>"><?php echo $lang['name']; ?></a></li>
|
||||
<?php foreach ($registered_languages as $code => $lang) { ?>
|
||||
<li><a href="<?php echo url_translate ($_SERVER['REQUEST_URI'], $code); ?>"><?php echo $lang['name']; ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -42,6 +42,8 @@ function url_translate ($url, $to) {
|
||||
|
||||
$name= basename ($url);
|
||||
$index= array_search ($name, $registered_languages[$from]['pages']);
|
||||
if (!$index)
|
||||
return $registered_languages[$to]['loc'];
|
||||
return $registered_languages[$to]['loc'] . $registered_languages[$to]['pages'][$index];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user