]> git.mjollnir.org Git - moodle.git/commitdiff
Further internationalisation
authormartin <martin>
Tue, 2 Jul 2002 07:09:26 +0000 (07:09 +0000)
committermartin <martin>
Tue, 2 Jul 2002 07:09:26 +0000 (07:09 +0000)
help.php
index.php
lang/en/strings.php

index a31208b0126de55dd055b59bb1c69396af27cb1d..a16f4416fcee0f76f96acdfe2353abf0df8c7141 100644 (file)
--- a/help.php
+++ b/help.php
 <LINK rel="stylesheet" href="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme?>/styles.css">
 </HEAD>
 <BODY BGCOLOR="<?=$THEME->body ?>">
-<? include("lang/$CFG->lang/page/$file"); ?>
+<? if (file_exists("lang/$CFG->lang/page/$file")) {
+       include("lang/$CFG->lang/page/$file");
+   } else {
+       include("lang/en/page/$file");
+   }
+?>
 </BODY>
 </HTML>
 
index 5f25c35c14429672d26dfde8ae66a3c93d5f2c5d..aa6ba51e663ec39081eb0ce6f15e48571dfb5bc7 100644 (file)
--- a/index.php
+++ b/index.php
@@ -13,7 +13,7 @@
     if (isset($USER->id)) {
         $headerbutton = update_course_icon($site->id);
     } else {
-        $headerbutton = "<FONT SIZE=2><A HREF=\"login/\">Log in</A></FONT>";
+        $headerbutton = "<FONT SIZE=2><A HREF=\"login/\">".get_string("login")."</A></FONT>";
     }
     print_header("$site->fullname", "$site->fullname", "", "",
                  "<META NAME=\"Description\" CONTENT=\"".stripslashes(strip_tags($site->summary))."\">",
       
          if ($site->newsitems > 0 or $readings or $USER->editing) {
       
-             print_simple_box("Main Menu", $align="CENTER", $width="100%", $color="$THEME->cellheading");
+             print_simple_box(get_string("mainmenu"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
 
              if ($site->newsitems > 0 ) {
-                 echo "<LI><A TITLE=\"Available courses on this server\" HREF=\"course/\"><B>Courses</B></A><BR></LI>";
+                 echo "<LI><A TITLE=\"".
+                      get_string("availablecourses").
+                      "\" HREF=\"course/\"><B>".
+                      get_string("courses").
+                      "</B></A><BR></LI>";
              } 
 
              if ($readings) {
@@ -42,7 +46,8 @@
                  }
              }
              if ($USER->editing) {
-                 echo "<P align=right><A HREF=\"$CFG->wwwroot/course/mod.php?id=$site->id&section=0&add=reading\">Add Reading</A>...</P>";
+                 echo "<P align=right><A HREF=\"$CFG->wwwroot/course/mod.php?id=$site->id&section=0&add=reading\">".
+                      get_string("addreading", "reading")."</A>...</P>";
              } else {
                  echo "<BR><BR>";
              }
      
 
          if (isadmin()) {
-             print_simple_box("Admin", $align="CENTER", $width="100%", $color="$THEME->cellheading");
-             echo "<LI><A HREF=\"$CFG->wwwroot/admin/\">Admin Page...</A></LI>";
-             echo "<LI><A HREF=\"$CFG->wwwroot/course/log.php?id=$site->id\">Site logs...</A></LI>";
-             echo "<LI><A HREF=\"$CFG->wwwroot/admin/site.php\">Site settings...</A></LI>";
+             print_simple_box(get_string("admin"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
+             echo "<LI><A HREF=\"$CFG->wwwroot/admin/\">".get_string("adminpage")."...</A></LI>";
+             echo "<LI><A HREF=\"$CFG->wwwroot/course/log.php?id=$site->id\">".get_string("sitelogs")."...</A></LI>";
+             echo "<LI><A HREF=\"$CFG->wwwroot/admin/site.php\">".get_string("sitesettings")."...</A></LI>";
          }
       ?>
 
@@ -61,7 +66,7 @@
 
     <TD WIDTH="70%" VALIGN="TOP">
       <? if ($site->newsitems == 0 ) {
-             print_simple_box("Available Courses", $align="CENTER", $width="100%", $color="$THEME->cellheading");
+             print_simple_box(get_string("availablecourses"), "CENTER", "100%", "$THEME->cellheading");
              echo "<IMG HEIGHT=8 SRC=\"pix/spacer.gif\" ALT=\"\"><BR>";
              print_all_courses();
 
              if (isset($USER->id)) {
                  $SESSION->fromdiscuss = "$CFG->wwwroot";
                  if (is_subscribed($USER->id, $newsforum->id)) {
-                     $subtext = "Unsubscribe from news";
+                     $subtext = get_string("unsubscribe", "forum");
                  } else {
-                     $subtext = "Subscribe me by mail";
+                     $subtext = get_string("subscribe", "forum");
                  }
                  $headertext = "<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0><TR>
-                                <TD>Site News</TD>
+                                <TD>".get_string("sitenews")."</TD>
                                 <TD ALIGN=RIGHT><FONT SIZE=1>
                                 <A HREF=\"mod/forum/subscribe.php?id=$newsforum->id\">$subtext</A>
                                 </TD></TR></TABLE>";
              } else {
-                 $headertext = "Site News";
+                 $headertext = get_string("sitenews");
              }
-             print_simple_box("$headertext", $align="CENTER", $width="100%", $color="$THEME->cellheading");
+             print_simple_box($headertext, "CENTER", "100%", $THEME->cellheading);
              echo "<IMG HEIGHT=8 SRC=\"pix/spacer.gif\" ALT=\"\"><BR>";
              print_forum_latest_topics($newsforum->id, $site->newsitems);
          }
          if ($USER->editing) {
              $site->summary .= "<BR><CENTER><A HREF=\"admin/site.php\"><IMG SRC=\"pix/i/edit.gif\" BORDER=0></A>";
          }
-         print_simple_box($site->summary, $align="", $width="100%", $color="$THEME->cellheading");
+         print_simple_box($site->summary, "", "100%", $THEME->cellheading);
       ?>
     </TD>
   </TR>
index 90b97856538f13f6090d2643d5ba888f4e7a8de8..3551c2a560b94e7e6115d1394cf065408489e73d 100644 (file)
@@ -1,6 +1,16 @@
 <?php 
 // Strings for Moodle site 
 
+$string[admin] = "Admin";
+
+$string[adminpage] = "Admin page";
+
+$string[availablecourses] = "Available Courses";
+
+$string[courses] = "Courses";
+
+$string[entercourse] = "Click to enter this course";
+
 $string[loggedinas] = "You are logged in as \$a.";
 
 $string[loggedinnot] = "You are not logged in.";
@@ -9,4 +19,12 @@ $string[login] = "Login";
 
 $string[logout] = "Logout";
 
+$string[mainmenu] = "Main menu";
+
+$string[sitelogs] = "Site logs";
+
+$string[sitenews] = "Site news";
+
+$string[sitesettings] = "Site settings";
+
 ?>