Commit:    5484b1bc673fe7551fb9f17f04bac6d7c557e253
Author:    Hannes Magnusson <[email protected]>         Sat, 1 Jan 2011 15:03:27 
+0000
Parents:   0c6cfe5d9dd22b5b5f24c99bcbb74657077eb37c
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=5484b1bc673fe7551fb9f17f04bac6d7c557e253

Log:
Add the language chooser back

Changed paths:
  M  include/shared-manual.inc
  M  styles/structure.css
  M  styles/theme.css


Diff:
diff --git a/include/shared-manual.inc b/include/shared-manual.inc
index e4f2938..34fbdf3 100644
--- a/include/shared-manual.inc
+++ b/include/shared-manual.inc
@@ -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(){}
diff --git a/styles/structure.css b/styles/structure.css
index 9fc01db..bb1162b 100644
--- a/styles/structure.css
+++ b/styles/structure.css
@@ -50,7 +50,9 @@ h1 {
     width: 14em;
 }
 
-#headsearch-submit {
+#headsearch-submit,
+#changelang-submit
+{
     border: 0;
     margin: 1px;
     padding: 2px 5px;
diff --git a/styles/theme.css b/styles/theme.css
index 7d65863..8937031 100644
--- a/styles/theme.css
+++ b/styles/theme.css
@@ -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;
+}
+


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to