]> git.mjollnir.org Git - moodle.git/commitdiff
Add setting of language to home page, and setting of new user accounts
authormoodler <moodler>
Mon, 20 Jan 2003 08:01:46 +0000 (08:01 +0000)
committermoodler <moodler>
Mon, 20 Jan 2003 08:01:46 +0000 (08:01 +0000)
to whatever the current language is.

index.php
login/signup.php

index 656b8076a959998b83d39eaac6cdf7696a4559ab..68d7bb7fce98830ac07b21941564f00324830169 100644 (file)
--- a/index.php
+++ b/index.php
             $headerbutton = "<FONT SIZE=2><A HREF=\"$CFG->wwwroot/login/index.php\">".get_string("login")."</A></FONT>";
         }
     }
+
+    if (isset($lang)) {
+        $SESSION->lang = $lang;
+        save_session("SESSION");
+    }
+    $currlang = current_language();
+    $langs = get_list_of_languages();
+    $langmenu = popup_form ("$CFG->wwwroot/?lang=", $langs, "chooselang", $currlang, "", "", "", true);
+
     print_header("$site->fullname", "$site->fullname", "home", "",
                  "<META NAME=\"Description\" CONTENT=\"".stripslashes(strip_tags($site->summary))."\">",
-                 true, "", $headerbutton);
+                 true, "", $headerbutton.$langmenu);
 
     $firstcolumn = false;  // for now
     $side = 175;
index ea32deb93d5eb11b063b3260343bf6ff1cc54e83..ab8471120f4c7335d40103d74c06ebe0705435c6 100644 (file)
@@ -11,7 +11,7 @@
 
             $user->password = md5($user->password);
             $user->confirmed = 0;
-            $user->lang = $CFG->lang;
+            $user->lang = current_language();
             $user->firstaccess = time();
             $user->secret = random_string(15);