mirror of
https://github.com/php/web-php.git
synced 2026-04-26 16:38:04 +02:00
Add the language chooser back
This commit is contained in:
@@ -531,6 +531,38 @@ function manual_setup_beta($setup) {
|
||||
$_SERVER["BASE_PAGE"] = "/manual/" . $setup["head"][1] . "/" . $setup["this"][0];
|
||||
site_header($setup["this"][1] . " - Manual ", array("current" => "docs", "leftmenu" => $menu));
|
||||
echo '<aside id="quicktoc"></aside>';
|
||||
|
||||
manual_language_chooser($setup['head'][1], $setup['this'][0]);
|
||||
}
|
||||
function manual_language_chooser($currentlang, $currentpage) {
|
||||
global $ACTIVE_ONLINE_LANGUAGES;
|
||||
|
||||
|
||||
$links = array();
|
||||
|
||||
foreach ($ACTIVE_ONLINE_LANGUAGES as $lang => $name) {
|
||||
$links[] = array("$lang/$currentpage", $name, $lang);
|
||||
}
|
||||
$links[] = array('help-translate.php', 'Other');
|
||||
|
||||
// Print out the form with all the options
|
||||
echo <<< FORM
|
||||
<form action="/manual/change.php" method="get" id="changelang">
|
||||
<fieldset>
|
||||
<select name="page" id="changelang-langs">
|
||||
FORM;
|
||||
foreach ($links as $link) {
|
||||
echo "<option value='{$link[0]}' " .($link[2] == $currentlang ? "selected" : ""). ">{$link[1]}</option>\n";
|
||||
}
|
||||
echo <<< FORM
|
||||
</select>
|
||||
<input type="submit"
|
||||
value="Go"
|
||||
id="changelang-submit"
|
||||
class="submit" />
|
||||
</fieldset>
|
||||
</form>
|
||||
FORM;
|
||||
}
|
||||
|
||||
function manual_header_beta(){}
|
||||
|
||||
@@ -50,7 +50,9 @@ h1 {
|
||||
width: 14em;
|
||||
}
|
||||
|
||||
#headsearch-submit {
|
||||
#headsearch-submit,
|
||||
#changelang-submit
|
||||
{
|
||||
border: 0;
|
||||
margin: 1px;
|
||||
padding: 2px 5px;
|
||||
|
||||
+18
-2
@@ -80,7 +80,9 @@ a:hover {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#headsearch-keywords {
|
||||
#headsearch-keywords,
|
||||
#changelang-langs
|
||||
{
|
||||
color: #666;
|
||||
background: transparent;
|
||||
-webkit-appearance: none;
|
||||
@@ -90,7 +92,9 @@ a:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#headsearch-submit {
|
||||
#headsearch-submit,
|
||||
#changelang-submit
|
||||
{
|
||||
border-color: #987db3;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
@@ -99,6 +103,14 @@ a:hover {
|
||||
background: #604080;
|
||||
color: #fff;
|
||||
}
|
||||
#changelang {
|
||||
border-color: #987db3;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #604080;
|
||||
float: right;
|
||||
}
|
||||
|
||||
#headnav li dl {
|
||||
line-height: 1;
|
||||
@@ -290,3 +302,7 @@ a.genanchor:hover {
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#langform {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user