]> git.mjollnir.org Git - moodle.git/commitdiff
Language-related fixes
authormartin <martin>
Thu, 4 Jul 2002 07:52:06 +0000 (07:52 +0000)
committermartin <martin>
Thu, 4 Jul 2002 07:52:06 +0000 (07:52 +0000)
config-dist.php
course/view.php
lang/en/strings.php
lib/setup.php
login/index.php
login/index_confirm.html
login/index_form.html
user/edit.html
user/edit.php
user/index.php
user/view.php

index 0ab586b10c82d8817182356af655aafa51370849..40b87882f9338acf95d954a0759f26b6468ff18c 100644 (file)
@@ -59,10 +59,17 @@ $CFG->dataroot  = "/home/moodledata";
 $CFG->theme     = "standard";
 
 
-// Choose a sitewide language - this will affect navigation, help etc
+// Choose a sitewide language - this will affect text, buttons etc
 // See lib/languages.php for a full list of standard language codes.
 
-$CFG->lang     = "en";
+$CFG->lang     = "en";    
+
+// Choose a sitewide locale - this will affect the display of dates
+// You need to have this locale data installed on your operating 
+// system.  If you don't know what to choose try using the same 
+// string as the language.
+
+$CFG->locale     = "en";
 
 
 // Give the full names of local SMTP servers that Moodle should use to
index 766a52aa88d8a6ceb3735b6469b32bd5b594d4a8..85f5c526478263a76b176ee94efb653d23925252 100644 (file)
@@ -31,7 +31,9 @@
         redirect("$CFG->wwwroot");
     }
 
-    print_header("Course: $course->fullname", "$course->fullname", "$course->shortname", "search.search", "", true,
+    $courseword = get_string("course");
+
+    print_header("$courseword: $course->fullname", "$course->fullname", "$course->shortname", "search.search", "", true,
                   update_course_icon($course->id));
 
     if (! $modtypes = get_records_sql_menu("SELECT name,fullname FROM modules ORDER BY fullname") ) {
 
 
 function make_editing_buttons($moduleid) {
+    $delete   = get_string("delete");
+    $moveup   = get_string("moveup");
+    $movedown = get_string("movedown");
+    $update   = get_string("update");
     return "&nbsp; &nbsp; 
           <A HREF=mod.php?delete=$moduleid><IMG 
-             SRC=../pix/t/delete.gif BORDER=0 ALT=Delete></A>
+             SRC=../pix/t/delete.gif BORDER=0 ALT=\"$delete\"></A>
           <A HREF=mod.php?id=$moduleid&move=-1><IMG 
-             SRC=../pix/t/up.gif BORDER=0 ALT=\"Move up\"></A>
+             SRC=../pix/t/up.gif BORDER=0 ALT=\"$moveup\"></A>
           <A HREF=mod.php?id=$moduleid&move=1><IMG 
-             SRC=../pix/t/down.gif BORDER=0 ALT=\"Move down\"></A>
+             SRC=../pix/t/down.gif BORDER=0 ALT=\"$movedown\"></A>
           <A HREF=mod.php?update=$moduleid><IMG 
-             SRC=../pix/t/edit.gif BORDER=0 ALT=Update></A>";
+             SRC=../pix/t/edit.gif BORDER=0 ALT=\"$update\"></A>";
 }
 
 function print_side_block($heading="", $list=NULL, $footer="", $icons=NULL) {
index 3551c2a560b94e7e6115d1394cf065408489e73d..edf662201b3ba8e5775eb3545610eff6670c0785 100644 (file)
@@ -1,30 +1,93 @@
 <?php 
 // Strings for Moodle site 
 
+$string[address] = "Address";
 $string[admin] = "Admin";
-
 $string[adminpage] = "Admin page";
-
+$string[alllogs] = "All logs";
 $string[availablecourses] = "Available Courses";
-
+$string[city] = "City/town";
+$string[contributions] = "Contributions";
+$string[country] = "Country";
+$string[course] = "Course";
 $string[courses] = "Courses";
+$string[currentlocaltime] = "your current local time";
+$string[delete] = "Delete";
+$string[editmyprofile] = "Edit my profile";
+$string[email] = "Email";
+$string[emailformat] = "Email format";
+$string[emailconfirmsent] = "
+   <P>An email should have been sent to your address at <B>\$a</B>
+   <P>It contains easy instructions to complete your registration.
+   <P>If you continue to have difficulty, contact the site administrator.";
 
 $string[entercourse] = "Click to enter this course";
-
+$string[firsttime] = "Is this your first time here?";
+$string[forgotten] = "Forgotten your username or password?";
+$string[fullprofile] = "Full profile";
+$string[home] = "Home";
+$string[htmlformat] = "Pretty HTML format";
+$string[icqnumber] = "ICQ number";
+$string[idnumber] = "ID number";
+$string[invalidlogin] = "Invalid login, please try again";
+$string[lastaccess] = "Last access";
+$string[location] = "Location";
 $string[loggedinas] = "You are logged in as \$a.";
-
 $string[loggedinnot] = "You are not logged in.";
-
 $string[login] = "Login";
-
+$string[loginas] = "Login as";
+$string[loginguest] = "Login as a guest";
+$string[loginsite] = "Login to the site";
+$string[loginusing] = "Login using your username and password";
+$string[loginsteps] = "
+   Hi! For full access to courses you'll need to take a minute to create
+   a new account for yourself on this web site.
+   Each of the individual courses may also have a one-time
+   &quot;enrolment key&quot;, which you won't need until later. Here are
+   the steps:
+   <OL size=2>
+   <LI>Fill out the <A HREF=\$a>New Account</A> form with your details.
+   <LI>An email will be immediately sent to your email address.
+   <LI>Read your email, and click on the web link it contains.
+   <LI>Your account will be confirmed and you will be logged in.
+   <LI>Now, select the course you want to participate in.
+   <LI>If you are prompted for a &quot;enrolment key&quot; - use the one
+   that your teacher has given you. This will &quot;enrol&quot; you in the
+   course.
+   <LI>You can now access the full course. From now on you will only need
+   to enter your personal username and password (in the form on this page)
+   to log in and access any course you have enrolled in.
+   </OL>";
 $string[logout] = "Logout";
-
 $string[mainmenu] = "Main menu";
-
+$string[movedown] = "Move down";
+$string[moveup] = "Move up";
+$string[mustconfirm] = "You need to confirm your login";
+$string[newpicture] = "New picture";
+$string[notenrolled] = "\$a is not enrolled in this course.";
+$string[participants] = "Participants";
+$string[password] = "Password";
+$string[personalprofile] = "Personal profile";
+$string[phone] = "Phone";
+$string[returningtosite] = "Returning to this web site?";
+$string[selectacountry] = "Select a country";
+$string[senddetails] = "Send my details via email";
+$string[serverlocaltime] = "Server's local time";
 $string[sitelogs] = "Site logs";
-
 $string[sitenews] = "Site news";
-
 $string[sitesettings] = "Site settings";
+$string[someallowguest] = "Some courses may allow guest access";
+$string[startsignup] = "Start now by creating a new account!";
+$string[teacheronly] = "for the \$a only";
+$string[textformat] = "Plain text format";
+$string[timezone] = "Timezone";
+$string[todaylogs] = "Today's logs";
+$string[unenrol] = "Unenrol";
+$string[unenrolme] = "Unenrol me from \$a";
+$string[update] = "Update";
+$string[updatemyprofile] = "Update my profile";
+$string[userdescription] = "Description";
+$string[username] = "Username";
+$string[webpage] = "Web page";
 
 ?>
index d72642c952bb73a595b40b46c96d3d7ff8e5d425..de7fb492587afe71e996752a22f039e6ee86fde8 100644 (file)
@@ -36,7 +36,7 @@
 
 // Set language/locale of printed times (must be supported by OS)
 
-    setlocale ("LC_TIME", $CFG->lang);
+    setlocale ("LC_TIME", $CFG->locale);
 
 // Load up theme variables (colours etc)
 
index fb493959158629552dcb35454789ef0056b775f4..ab73b0b7a268232925ff10b2248264d1ae332ff5 100644 (file)
@@ -28,7 +28,7 @@
 
         if ($user) {
             if (! $user->confirmed ) {       // they never confirmed via email 
-                print_header("Need to confirm", "Not confirmed yet", "", ""); 
+                print_header(get_string("mustconfirm"), get_string("mustconfirm") ); 
                 include("index_confirm.html");
                 die;
             }
     
                    reset_login_count();
 
-            if ($CFG->smsnotify) {
-                $time = date("H:i D j M", time());
-                $smstring = "$time - $USER->firstname $USER->lastname logged in to $CFG->sitename";
-                system("echo \"$smstring   \" | /opt/bin/sendsms &> /dev/null &");
-            }
-    
             die;
     
         } else {
-            $errormsg = "Invalid login, please try again";
+            $errormsg = get_string("invalidlogin");
         }
     }
     
@@ -82,7 +76,9 @@
         $focus = "form.username";
     }
     
-    print_header("Login to the site", "Login to the site", "Login", $focus); 
+    $loginsite = get_string("loginsite");
+
+    print_header($loginsite, $loginsite, get_string("login"), $focus); 
 
     include("index_form.html");
 
index 5a1568b586cfa17a06c44f99eabae03f362d7515..e3327aaf040ad879358ba473528096aae88dab35 100644 (file)
@@ -1,20 +1,7 @@
 <CENTER>
-
-<h2>Sorry, <? pv($user->firstname) ?>, but you can't log in until you have confirmed your registration</h2>
-
-<h2>Please check your email!</h2>
-
-<p class=normal>
-An email should have been sent to your address at <? pv($user->email) ?>
-
-</p>
-<p class=normal>
-It contains easy instructions to complete your registration.
-</p>
-
-<p>If you continue to have difficulty, contact the site administrator.
-
+<H2><? print_string("mustconfirm") ?></H2>
+<? print_string("emailconfirmsent", "", $user->email) ?>
 <HR>
-<CENTER>
-<P><A HREF="<?=$CFG->wwwroot ?>">Home</A></P>
+<P><A HREF="<?=$CFG->wwwroot ?>"><? print_string("home") ?></A></P>
+</CENTER>
 
index 17a106682a82acc6470e0040c4624a0ba0ec4d1d..89ad7e5cd24b5b80ab3af99005eb207c63b26116 100644 (file)
@@ -3,15 +3,15 @@
 <TABLE WIDTH="90%" BORDER="0" CELLSPACING="10" CELLPADDING="5" ALIGN="CENTER">\r
   <TR>\r
     <TD WIDTH="50%" bgcolor=<?=$THEME->cellheading2?>>\r
-      <P ALIGN="CENTER"><B><FONT SIZE=3>Returning to this web site?</FONT></B></P>\r
+      <P ALIGN="CENTER"><B><FONT SIZE=3><? print_string("returningtosite") ?></FONT></B></P>\r
     </TD>\r
     <TD WIDTH="50%" bgcolor=<?=$THEME->cellheading2?>>\r
-      <P ALIGN="CENTER"><B><FONT SIZE=3>Is this your first time here?</FONT></B></P>\r
+      <P ALIGN="CENTER"><B><FONT SIZE=3><? print_string("firsttime") ?></FONT></B></P>\r
     </TD>\r
   </TR>\r
   <TR>\r
     <TD WIDTH="50%" VALIGN="TOP" bgcolor="<?=$THEME->cellheading?>"> <FONT SIZE=2> \r
-      <P ALIGN="CENTER">Log in using your username and password:<BR>\r
+      <P ALIGN="CENTER"><? print_string("loginusing") ?>:<BR>\r
          <? formerr($errormsg) ?>\r
       </p></font>\r
       <FORM NAME="form" ACTION="<?=$CFG->wwwroot?>/login/" METHOD=post>\r
             <td width="80%"><FONT SIZE=2>\r
               <TABLE ALIGN=center>\r
                 <TR> \r
-                  <TD align=right><P><FONT SIZE=2>Username:</FONT></P></TD>\r
+                  <TD align=right><P><FONT SIZE=2><? print_string("username") ?>:</FONT></P></TD>\r
                   <TD><INPUT TYPE="text" NAME="username" SIZE="15" value="<? p($frm->username) ?>"> \r
                   </TD>\r
                 </TR>\r
                 <TR> \r
-                  <TD height="24" align=right><P><FONT SIZE=2>Password:</FONT></P></TD>\r
+                  <TD height="24" align=right><P><FONT SIZE=2><? print_string("password") ?>:</FONT></P></TD>\r
                   <TD><INPUT TYPE="password" NAME="password" SIZE="15" value="<? p($frm->password) ?>"> \r
                   </TD>\r
                 </TR>\r
               </TABLE>\r
               </FONT></td>\r
             <td width="20%"><font size=2>\r
-              <input type="submit" name="Submit" value="Log in">\r
+              <input type="submit" name="Submit" value="<? print_string("login") ?>">\r
               </font></td>\r
         </tr>\r
       </table>\r
       <FONT SIZE=2> \r
       <BLOCKQUOTE>\r
       <HR>\r
-        <P ALIGN=CENTER>Some courses may allow guest access:</P>\r
+        <P ALIGN=CENTER><? print_string("someallowguest") ?>:</P>\r
         <CENTER>\r
         <FORM NAME="form2" ACTION="<?=$CFG->wwwroot?>/login/" METHOD=post>\r
         <INPUT TYPE="hidden" NAME="username" VALUE="guest">\r
         <INPUT TYPE="hidden" NAME="password" VALUE="guest">\r
-        <INPUT type="submit" NAME="Submit"   VALUE="Log in as a guest">\r
+        <INPUT type="submit" NAME="Submit"   VALUE="<? print_string("loginguest") ?>">\r
         </FORM>\r
         </CENTER>\r
       <HR>\r
-        <P ALIGN=CENTER>Forgotten your username or password?</P> \r
+        <P ALIGN=CENTER><? print_string("forgotten") ?></P> \r
         <CENTER>\r
         <FORM NAME="form3" ACTION="forgot_password.php" METHOD=post>\r
-        <INPUT type="submit" NAME="Submit" VALUE="Send my details via email">\r
+        <INPUT type="submit" NAME="Submit" VALUE="<? print_string("senddetails") ?>">\r
         </FORM>\r
         </CENTER>\r
         </BLOCKQUOTE>\r
       </FONT> </TD>\r
     <TD WIDTH="50%" VALIGN="TOP" bgcolor="<?=$THEME->cellheading?>">\r
       <FONT SIZE=2>\r
-      <P>Hi! For full access to courses you'll need to take a minute to create \r
-        a new account for yourself on this web site.\r
-        Each of the individual courses may also have a one-time \r
-        &quot;enrolment key&quot;, which you won't need until later. Here are \r
-        the steps:</P>\r
-        <OL size=2>\r
-      <LI>Fill out the <A HREF="signup.php">New Account</A> form with your details.\r
-      <LI>An email will be immediately sent to your email address. \r
-      <LI>Read your email, and click on the web link it contains.\r
-      <LI>Your account will be confirmed and you will be logged in.\r
-      <LI>Now, select the course you want to participate in.\r
-      <LI>If you are prompted for a &quot;enrolment key&quot; - use the one \r
-        that your teacher has given you. This will &quot;enrol&quot; you in the \r
-        course.\r
-      <LI>You can now access the full course. From now on you will only need \r
-        to enter your personal username and password (in the form on this page) \r
-        to log in and access any course you have enrolled in.\r
-               </OL>\r
+      <P><? print_string("loginsteps", "", "signup.php") ?></P>\r
       </FONT>\r
         <CENTER>\r
         <FORM NAME="form4" ACTION="signup.php" METHOD=post>\r
-        <INPUT type="submit" NAME="Submit" VALUE="Start now by creating a new account!">\r
+        <INPUT type="submit" NAME="Submit" VALUE="<? print_string("startsignup") ?>">\r
         </FORM>\r
         </CENTER>\r
       </TD>\r
@@ -89,4 +72,4 @@
 \r
 <HR>\r
 <CENTER>\r
-<P><A HREF="<?=$CFG->wwwroot ?>">Home</A></P>\r
+<P><A HREF="<?=$CFG->wwwroot ?>"><? print_string("home") ?></A></P>\r
index 0d883d82b431ff033309c246039fc431b7b47935..5718a6cedc26d047f06ee99b1eb1fab776968d56 100644 (file)
@@ -1,83 +1,83 @@
 <FORM METHOD="post" ENCTYPE="multipart/form-data" action="edit.php">
 <table cellpadding=9 cellspacing=0 >
 <tr valign=top>
-       <td><P>New picture:</td>
+       <td><P><? echo get_string("newpicture") ?>:</td>
        <td>
     <INPUT type="hidden" name="MAX_FILE_SIZE" value="4000000">
-    <input type="file" name="imagefile" size=40> ( .jpg or .png ) <? helpbutton("picture") ?>
+    <input type="file" name="imagefile" size=40> ( .jpg / .png ) <? helpbutton("picture") ?>
        <? formerr($err["imagefile"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Description:</td>
+       <td><P><? echo get_string("userdescription") ?>:</td>
        <td><TEXTAREA NAME=description COLS=50 ROWS=10 WRAP=virtual><?=$user->description ?></TEXTAREA> 
     <? helpbutton("text") ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Email address:</td>
+       <td><P><? echo get_string("email") ?>:</td>
        <td><input type="text" name="email" size=30 value="<?=$user->email ?>">
        <? formerr($err["email"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Email format:</td>
+       <td><P><? echo get_string("emailformat") ?>:</td>
        <td><? 
-    $choices["0"] = "Plain text format";
-    $choices["1"] = "Pretty HTML format";
+    $choices["0"] = get_string("textformat");
+    $choices["1"] = get_string("htmlformat");
     choose_from_menu ($choices, "mailformat", $user->mailformat, "") ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Web address (URL):</td>
+       <td><P><? echo get_string("webpage") ?>:</td>
        <td><input type="text" name="url" size=30 value="<?=$user->url ?>">
        <? formerr($err["url"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>ICQ number:</td>
+       <td><P><? echo get_string("icqnumber") ?>:</td>
        <td><input type="text" name="icq" size=25 value="<?=$user->icq ?>">
        <? formerr($err["icq"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>ID Number:</td>
-       <td><input type="text" name="idnumber" size=25 value="<?=$user->idnumber ?>"> (for the <?=$teacher ?> only)
+       <td><P><? echo get_string("idnumber") ?>:</td>
+       <td><input type="text" name="idnumber" size=25 value="<?=$user->idnumber ?>"> <?=$teacheronly ?>
        <? formerr($err["idnumber"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Phone number 1:</td>
-       <td><input type="text" name="phone1" size=25 value="<?=$user->phone1 ?>"> (for the <?=$teacher ?> only)
+       <td><P><? echo get_string("phone") ?> 1:</td>
+       <td><input type="text" name="phone1" size=25 value="<?=$user->phone1 ?>"> <?=$teacheronly ?>
        <? formerr($err["phone1"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Phone number 2:</td>
-       <td><input type="text" name="phone2" size=25 value="<?=$user->phone2 ?>"> (for the <?=$teacher ?> only)
+       <td><P><? echo get_string("phone") ?> 2:</td>
+       <td><input type="text" name="phone2" size=25 value="<?=$user->phone2 ?>"> <?=$teacheronly ?>
        <? formerr($err["phone2"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Street Address:</td>
-       <td><input type="text" name="address" size=25 value="<?=$user->address ?>"> (for the <?=$teacher ?> only)
+       <td><P><? echo get_string("address") ?>:</td>
+       <td><input type="text" name="address" size=25 value="<?=$user->address ?>"> <?=$teacheronly ?>
        <? formerr($err["address"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>City/town:</td>
+       <td><P><? echo get_string("city") ?>:</td>
        <td><input type="text" name="city" size=25 value="<?=$user->city ?>">
        <? formerr($err["city"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Country:</td>
-       <td><? choose_from_menu ($COUNTRIES, "country", $user->country, "Select a country...", "", "") ?>
+       <td><P><? echo get_string("country") ?>:</td>
+       <td><? choose_from_menu ($COUNTRIES, "country", $user->country, get_string("selectacountry")."...", "", "") ?>
        <? formerr($err["country"]) ?>
        </td>
 </tr>
 <tr valign=top>
-       <td><P>Timezone:</td>
+       <td><P><? echo get_string("timezone") ?>:</td>
        <td><?
        if (abs($user->timezone) > 12) {
            $user->timezone = 99;
            $zone = (float)$tz/2.0;
            $usertime = $timenow + ($tz * 1800);
            if ($tz == 0) {
-               $timezones["$zone"] = gmdate("D, h:i a", $usertime)." (GMT)";
+               $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT)";
            } else if ($tz < 0) {
-               $timezones["$zone"] = gmdate("D, h:i a", $usertime)." (GMT$zone)";
+               $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT$zone)";
            } else {
-               $timezones["$zone"] = gmdate("D, h:i a", $usertime)." (GMT+$zone)";
+               $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT+$zone)";
            }
        }
 
-       choose_from_menu ($timezones, "timezone", $user->timezone, "Use the server's local time", "", "99");
+       choose_from_menu ($timezones, "timezone", $user->timezone, get_string("serverlocaltime"), "", "99");
 
+       echo "(".get_string(currentlocaltime).")";
        ?>
-    (Your current local time)</td>
+    </td>
 </tr>
 <tr>
        <td></td>
-       <td><input type="submit" value="Update my profile"></td>
+       <td><input type="submit" value="<? echo get_string("updatemyprofile") ?>"></td>
 </TABLE>
 <INPUT type="hidden" name="course" value="<?=$course->id ?>">
 <INPUT type="hidden" name="id" value="<?=$user->id ?>"> 
index 9e06031e2ecca9935e9e393d88872c9874eeab70..343899b273cdbe5de10886066fcf6cf1dfc4cd1b 100644 (file)
     }
 
     $teacher = strtolower($course->teacher);
+    $teacheronly = "(".get_string("teacheronly", "", $teacher).")";
 
     print_simple_box_start("center", "", "$THEME->cellheading");
     echo "<H2>User profile for $user->firstname $user->lastname</H2>";
index 9c325df8810aeaf1bdea1a44965327e7b0926bb2..d6dc6fdc456bfc524cbd2eb2f8e49b2b7a6b271b 100644 (file)
     add_to_log($course->id, "user", "view all", "index.php?id=$course->id", "");
 
     if ($course->category) {
-        print_header("$course->shortname: Participants", "$course->fullname",
-                     "<A HREF=../course/view.php?id=$course->id>$course->shortname</A> -> Participants", "");
+        print_header("$course->shortname: ".get_string("participants"), "$course->fullname",
+                     "<A HREF=../course/view.php?id=$course->id>$course->shortname</A> -> ".
+                      get_string("participants"), "");
     } else {
-        print_header("$course->shortname: Participants", "$course->fullname", "Participants", "");
+        print_header("$course->shortname: ".get_string("participants"), "$course->fullname", 
+                      get_string("participants"), "");
     }
 
 
@@ -67,24 +69,25 @@ function print_user($user, $course, $teacherlinks) {
     echo "</TD><TD WIDTH=100% BGCOLOR=#FFFFFF VALIGN=top>";
     echo "<FONT SIZE=-1>";
     echo "<FONT SIZE=3><B>$user->firstname $user->lastname</B></FONT>";
-    echo "<P>Email: <A HREF=\"mailto:$user->email\">$user->email</A><BR>";
-    echo "Location: $user->city, ".$COUNTRIES["$user->country"]."<BR>";
-    echo "Last access: ".userdate($user->lastaccess);
+    echo "<P>";
+    echo get_string("email").": <A HREF=\"mailto:$user->email\">$user->email</A><BR>";
+    echo get_string("location").": $user->city, ".$COUNTRIES["$user->country"]."<BR>";
+    echo get_string("lastaccess").": ".userdate($user->lastaccess);
     echo "&nbsp (".format_time(time() - $user->lastaccess).")";
     echo "</TD><TD VALIGN=bottom BGCOLOR=#FFFFFF NOWRAP>";
 
     echo "<FONT SIZE=1>";
     if ($teacherlinks) {
         $timemidnight = usergetmidnight(time());
-        echo "<A HREF=\"../course/user.php?id=$course->id&user=$user->id\">Contributions</A><BR>";
-        echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id&date=$timemidnight\">Today's logs</A><BR>";
-        echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id\">All logs</A><BR>";
-        echo "<A HREF=\"../course/unenrol.php?id=$course->id&user=$user->id\">Unenrol</A><BR>";
+        echo "<A HREF=\"../course/user.php?id=$course->id&user=$user->id\">".get_string("contributions")."</A><BR>";
+        echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id&date=$timemidnight\">".get_string("todaylogs")."</A><BR>";
+        echo "<A HREF=\"../course/log.php?id=$course->id&user=$user->id\">".get_string("alllogs")."</A><BR>";
+        echo "<A HREF=\"../course/unenrol.php?id=$course->id&user=$user->id\">".get_string("unenrol")."</A><BR>";
         if (isstudent($course->id, $user->id)) {
-            echo "<A HREF=\"../course/loginas.php?id=$course->id&user=$user->id\">Login as</A><BR>";
+            echo "<A HREF=\"../course/loginas.php?id=$course->id&user=$user->id\">".get_string("loginas")."</A><BR>";
         }
     }
-    echo "<A HREF=\"view.php?id=$user->id&course=$course->id\">Full profile...</A>";
+    echo "<A HREF=\"view.php?id=$user->id&course=$course->id\">".get_string("fullprofile")."...</A>";
     echo "</FONT>";
 
     echo "</TD></TR></TABLE></TD></TR></TABLE>";
index e490ceb8a930840ad4d89d9fc6240a45d9a1b26f..dd2fe22f453aa6383aeeb5a1554463fe4e5f9374 100644 (file)
         require_login($course->id);
     }
 
-    $fullname = "$user->firstname $user->lastname";
-
-
     add_to_log($course->id, "user", "view", "view.php?id=$user->id&course=$course->id", "$user->id");
 
+    $fullname = "$user->firstname $user->lastname";
+    $personalprofile = get_string("personalprofile");
+    $participants = get_string("participants");
+
     if ($course->category) {
-        print_header("Personal profile: $fullname", "Personal profile: $fullname", 
+        print_header("$personalprofile: $fullname", "$personalprofile: $fullname", 
                      "<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> -> 
-                      <A HREF=\"index.php?id=$course->id\">Participants</A> -> $fullname", "");
+                      <A HREF=\"index.php?id=$course->id\">$participants</A> -> $fullname", "");
     } else {
-        print_header("Personal profile: $fullname", "Personal profile: $fullname", "$fullname", "");
+        print_header("$personalprofile: $fullname", "$personalprofile: $fullname", "$fullname", "");
     }
 
     if ($course->category and ! isguest() ) {
         if (!isstudent($course->id, $user->id) && !isteacher($course->id, $user->id)) {
-            print_heading("$fullname is not enrolled in this course");
+            print_heading(get_string("notenrolled", "", $fullname));
             print_footer($course);
             die;
         }
     // Print name and edit button across top
 
     echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD NOWRAP>";
-    echo "<H3>$user->firstname $user->lastname</H3>";
+    echo "<H3>$fullname</H3>";
     echo "</TD><TD align=right>";
     if ($id == $USER->id and !isguest()) {
         echo "<P><FORM ACTION=edit.php METHOD=GET>";
         echo "<INPUT type=hidden name=id value=\"$id\">";
         echo "<INPUT type=hidden name=course value=\"$course->id\">";
-        echo "<INPUT type=submit value=\"Edit my profile\">";
+        echo "<INPUT type=submit value=\"".get_string("editmyprofile")."\">";
         echo "</FORM></P>";
     }
     echo "</TD></TR></TABLE>";
     echo "<TABLE BORDER=0 CELLPADDING=5 CELLSPACING=2";
 
     if ($user->city or $user->country) {
-        print_row("Location:", "$user->city, ".$COUNTRIES["$user->country"]);
+        print_row(get_string("location").":", "$user->city, ".$COUNTRIES["$user->country"]);
     }
 
     if (isteacher($course->id)) {
         if ($user->address) {
-            print_row("Address:", "$user->address");
+            print_row(get_string("address").":", "$user->address");
         }
         if ($user->phone1) {
-            print_row("Phone:", "$user->phone1");
+            print_row(get_string("phone").":", "$user->phone1");
         }
         if ($user->phone2) {
-            print_row("Phone:", "$user->phone2");
+            print_row(get_string("phone").":", "$user->phone2");
         }
     }
 
-    print_row("Email:", "<A HREF=\"mailto:$user->email\">$user->email</A>");
+    print_row(get_string("email").":", "<A HREF=\"mailto:$user->email\">$user->email</A>");
 
     if ($user->url) {
-        print_row("Web page:", "<A HREF=\"$user->url\">$user->url</A>");
+        print_row(get_string("webpage").":", "<A HREF=\"$user->url\">$user->url</A>");
     }
 
     if ($user->icq) {
     }
 
     $datestring = userdate($user->lastaccess)."&nbsp (".format_time(time() - $user->lastaccess).")";
-    print_row("Last access:", $datestring);
+    print_row(get_string("lastaccess").":", $datestring);
 
     echo "</TABLE>";
 
         echo "<CENTER><TABLE ALIGN=CENTER><TR>";
         echo "<TD NOWRAP><P><FORM ACTION=\"../course/unenrol.php\" METHOD=GET>";
         echo "<INPUT type=hidden name=id value=\"$course->id\">";
-        echo "<INPUT type=submit value=\"Unenrol me from $course->shortname\">";
+        echo "<INPUT type=submit value=\"".get_string("unenrolme", "", $course->shortname)."\">";
         echo "</FORM></P></TD>";
         echo "</TR></TABLE></CENTER>\n";
     }