Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Language-related fixes

  • Loading branch information...
commit fa0626c6f4233757d0fb18cc4b0e2f2c90b53810 1 parent bcc83c4
martin authored
View
11 config-dist.php
@@ -59,10 +59,17 @@
$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
View
16 course/view.php
@@ -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") ) {
@@ -72,15 +74,19 @@
function make_editing_buttons($moduleid) {
+ $delete = get_string("delete");
+ $moveup = get_string("moveup");
+ $movedown = get_string("movedown");
+ $update = get_string("update");
return "   
<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) {
View
85 lang/en/strings.php
@@ -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";
?>
View
2  lib/setup.php
@@ -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)
View
14 login/index.php
@@ -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;
}
@@ -56,16 +56,10 @@
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");
View
21 login/index_confirm.html
@@ -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>
View
43 login/index_form.html
@@ -3,15 +3,15 @@
<TABLE WIDTH="90%" BORDER="0" CELLSPACING="10" CELLPADDING="5" ALIGN="CENTER">
<TR>
<TD WIDTH="50%" bgcolor=<?=$THEME->cellheading2?>>
- <P ALIGN="CENTER"><B><FONT SIZE=3>Returning to this web site?</FONT></B></P>
+ <P ALIGN="CENTER"><B><FONT SIZE=3><? print_string("returningtosite") ?></FONT></B></P>
</TD>
<TD WIDTH="50%" bgcolor=<?=$THEME->cellheading2?>>
- <P ALIGN="CENTER"><B><FONT SIZE=3>Is this your first time here?</FONT></B></P>
+ <P ALIGN="CENTER"><B><FONT SIZE=3><? print_string("firsttime") ?></FONT></B></P>
</TD>
</TR>
<TR>
<TD WIDTH="50%" VALIGN="TOP" bgcolor="<?=$THEME->cellheading?>"> <FONT SIZE=2>
- <P ALIGN="CENTER">Log in using your username and password:<BR>
+ <P ALIGN="CENTER"><? print_string("loginusing") ?>:<BR>
<? formerr($errormsg) ?>
</p></font>
<FORM NAME="form" ACTION="<?=$CFG->wwwroot?>/login/" METHOD=post>
@@ -20,19 +20,19 @@
<td width="80%"><FONT SIZE=2>
<TABLE ALIGN=center>
<TR>
- <TD align=right><P><FONT SIZE=2>Username:</FONT></P></TD>
+ <TD align=right><P><FONT SIZE=2><? print_string("username") ?>:</FONT></P></TD>
<TD><INPUT TYPE="text" NAME="username" SIZE="15" value="<? p($frm->username) ?>">
</TD>
</TR>
<TR>
- <TD height="24" align=right><P><FONT SIZE=2>Password:</FONT></P></TD>
+ <TD height="24" align=right><P><FONT SIZE=2><? print_string("password") ?>:</FONT></P></TD>
<TD><INPUT TYPE="password" NAME="password" SIZE="15" value="<? p($frm->password) ?>">
</TD>
</TR>
</TABLE>
</FONT></td>
<td width="20%"><font size=2>
- <input type="submit" name="Submit" value="Log in">
+ <input type="submit" name="Submit" value="<? print_string("login") ?>">
</font></td>
</tr>
</table>
@@ -40,47 +40,30 @@
<FONT SIZE=2>
<BLOCKQUOTE>
<HR>
- <P ALIGN=CENTER>Some courses may allow guest access:</P>
+ <P ALIGN=CENTER><? print_string("someallowguest") ?>:</P>
<CENTER>
<FORM NAME="form2" ACTION="<?=$CFG->wwwroot?>/login/" METHOD=post>
<INPUT TYPE="hidden" NAME="username" VALUE="guest">
<INPUT TYPE="hidden" NAME="password" VALUE="guest">
- <INPUT type="submit" NAME="Submit" VALUE="Log in as a guest">
+ <INPUT type="submit" NAME="Submit" VALUE="<? print_string("loginguest") ?>">
</FORM>
</CENTER>
<HR>
- <P ALIGN=CENTER>Forgotten your username or password?</P>
+ <P ALIGN=CENTER><? print_string("forgotten") ?></P>
<CENTER>
<FORM NAME="form3" ACTION="forgot_password.php" METHOD=post>
- <INPUT type="submit" NAME="Submit" VALUE="Send my details via email">
+ <INPUT type="submit" NAME="Submit" VALUE="<? print_string("senddetails") ?>">
</FORM>
</CENTER>
</BLOCKQUOTE>
</FONT> </TD>
<TD WIDTH="50%" VALIGN="TOP" bgcolor="<?=$THEME->cellheading?>">
<FONT SIZE=2>
- <P>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:</P>
- <OL size=2>
- <LI>Fill out the <A HREF="signup.php">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>
+ <P><? print_string("loginsteps", "", "signup.php") ?></P>
</FONT>
<CENTER>
<FORM NAME="form4" ACTION="signup.php" METHOD=post>
- <INPUT type="submit" NAME="Submit" VALUE="Start now by creating a new account!">
+ <INPUT type="submit" NAME="Submit" VALUE="<? print_string("startsignup") ?>">
</FORM>
</CENTER>
</TD>
@@ -89,4 +72,4 @@
<HR>
<CENTER>
-<P><A HREF="<?=$CFG->wwwroot ?>">Home</A></P>
+<P><A HREF="<?=$CFG->wwwroot ?>"><? print_string("home") ?></A></P>
View
55 user/edit.html
@@ -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;
@@ -88,22 +88,23 @@
$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 ?>">
View
1  user/edit.php
@@ -136,6 +136,7 @@
}
$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>";
View
27 user/index.php
@@ -17,10 +17,12 @@
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>";
View
35 user/view.php
@@ -23,22 +23,23 @@
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;
}
@@ -58,13 +59,13 @@
// 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>";
@@ -82,25 +83,25 @@
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) {
@@ -108,7 +109,7 @@
}
$datestring = userdate($user->lastaccess)."&nbsp (".format_time(time() - $user->lastaccess).")";
- print_row("Last access:", $datestring);
+ print_row(get_string("lastaccess").":", $datestring);
echo "</TABLE>";
@@ -119,7 +120,7 @@
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";
}
Please sign in to comment.
Something went wrong with that request. Please try again.