added gettext support.
authorserek <serek@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 13 Jan 2000 19:19:26 +0000 (19:19 +0000)
committerserek <serek@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 13 Jan 2000 19:19:26 +0000 (19:19 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@161 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/read_body.php
src/right_main.php
src/signout.php
src/webmail.php

index 19af9651ed051a1e964866d4660f0bd481d21332..ad72c167d197189cfe0135af1c19be1965fcee7f 100644 (file)
 
    $dateString = getLongDateString($message["HEADER"]["DATE"]);
 
+   /** TEXT STRINGS DEFINITIONS **/
+   $echo_more = _("more");
+   $echo_less = _("less");
+
    /** FORMAT THE TO STRING **/
    $i = 0;
    $to_string = "";
       if (count($to_ary) > 1) {
          if ($show_more == false) {
             if ($i == 1) {
-               $to_string = "$to_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more=1&show_more_cc=$show_more_cc\">more</A>)";
+               $to_string = "$to_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more=1&show_more_cc=$show_more_cc\">$echo_more</A>)";
                $i = count($to_ary);
             }
          } else if ($i == 1) {
-            $to_string = "$to_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more=0&show_more_cc=$show_more_cc\">less</A>)";
+            $to_string = "$to_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more=0&show_more_cc=$show_more_cc\">$echo_less</A>)";
          }
       }
    }
       if (count($cc_ary) > 1) {
          if ($show_more_cc == false) {
             if ($i == 1) {
-               $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more_cc=1&show_more=$show_more\">more</A>)";
+               $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more_cc=1&show_more=$show_more\">$echo_more</A>)";
                $i = count($cc_ary);
             }
          } else if ($i == 1) {
-            $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more_cc=0&show_more=$show_more\">less</A>)";
+            $cc_string = "$cc_string&nbsp;(<A HREF=\"read_body.php?mailbox=$urlMailbox&passed_id=$passed_id&sort=$sort&startMessage=$startMessage&show_more_cc=0&show_more=$show_more\">$echo_less</A>)";
          }
       }
    }
    echo "         <TR>";
    echo "            <TD ALIGN=LEFT WIDTH=50%>";
    echo "               <FONT FACE=\"Arial,Helvetica\" SIZE=2>";
-   echo "               <A HREF=\"right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">Message List</A>&nbsp;|&nbsp;";
-   echo "               <A HREF=\"delete_message.php?mailbox=$urlMailbox&message=$passed_id&sort=$sort&startMessage=1\">Delete</A>&nbsp;&nbsp;";
+   echo "               <A HREF=\"right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">";
+   echo _("Message List");
+   echo "</A>&nbsp;|&nbsp;";
+   echo "               <A HREF=\"delete_message.php?mailbox=$urlMailbox&message=$passed_id&sort=$sort&startMessage=1\">";
+   echo _("Delete");
+   echo "</A>&nbsp;&nbsp;";
    echo "               </FONT>";
    echo "            </TD><TD WIDTH=50% ALIGN=RIGHT>";
    echo "               <FONT FACE=\"Arial,Helvetica\" SIZE=2>";
-   echo "               <A HREF=\"compose.php?forward_id=$passed_id&forward_subj=$url_subj&mailbox=$urlMailbox\">Forward</A>&nbsp;|&nbsp;";
-   echo "               <A HREF=\"compose.php?send_to=$url_replyto&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">Reply</A>&nbsp;|&nbsp;";
-   echo "               <A HREF=\"compose.php?send_to=$url_replytoall&send_to_cc=$url_replytoallcc&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">Reply All</A>&nbsp;&nbsp;";
+   echo "               <A HREF=\"compose.php?forward_id=$passed_id&forward_subj=$url_subj&mailbox=$urlMailbox\">";
+   echo _("Forward");
+   echo "</A>&nbsp;|&nbsp;";
+   echo "               <A HREF=\"compose.php?send_to=$url_replyto&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">";
+   echo _("Reply");
+   echo "</A>&nbsp;|&nbsp;";
+   echo "               <A HREF=\"compose.php?send_to=$url_replytoall&send_to_cc=$url_replytoallcc&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">";
+   echo _("Reply All");
+   echo "</A>&nbsp;&nbsp;";
    echo "               </FONT>";
    echo "            </TD>";
    echo "         </TR>";
    echo "      <TR>\n";
    /** subject **/
    echo "         <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT>\n";
-   echo "            <FONT FACE=\"Arial,Helvetica\">Subject:</FONT>\n";
+   echo "            <FONT FACE=\"Arial,Helvetica\">";
+   echo _("Subject:");
+   echo "</FONT>\n";
    echo "         </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85%>\n";
    echo "            <FONT FACE=\"Arial,Helvetica\"><B>$subject</B></FONT>\n";
    echo "         </TD>\n";
    /** from **/
    echo "      <TR>\n";
    echo "         <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT>\n";
-   echo "            <FONT FACE=\"Arial,Helvetica\">From:</FONT>\n";
+   echo "            <FONT FACE=\"Arial,Helvetica\">";
+   echo _("From:");
+   echo "</FONT>\n";
    echo "         </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85%>\n";
    echo "            <FONT FACE=\"Arial,Helvetica\"><B>$from_name</B></FONT>\n";
    echo "         </TD>\n";
    /** date **/
    echo "      <TR>\n";
    echo "         <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT>\n";
-   echo "            <FONT FACE=\"Arial,Helvetica\">Date:</FONT>\n";
+   echo "            <FONT FACE=\"Arial,Helvetica\">";
+   echo _("Date:")
+   echo "</FONT>\n";
    echo "         </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85%>\n";
    echo "            <FONT FACE=\"Arial,Helvetica\"><B>$dateString</B></FONT>\n";
    echo "         </TD>\n";
    /** to **/
    echo "      <TR>\n";
    echo "         <TD BGCOLOR=\"$color[4]\" WIDTH=15% ALIGN=RIGHT VALIGN=TOP>\n";
-   echo "            <FONT FACE=\"Arial,Helvetica\">To:</FONT>\n";
+   echo "            <FONT FACE=\"Arial,Helvetica\">;
+   echo _("To:");
+   echo "</FONT>\n";
    echo "         </TD><TD BGCOLOR=\"$color[4]\" WIDTH=85% VALIGN=TOP>\n";
    echo "            <FONT FACE=\"Arial,Helvetica\"><B>$to_string</B></FONT>\n";
    echo "         </TD>\n";
    echo "   <TR><TD BGCOLOR=\"$color[9]\">&nbsp;</TD></TR>";
    echo "</TABLE>\n";
 
-?>
\ No newline at end of file
+?>
index d706044314632ada5592f2c9a13fce4e757043f5..99d0b40b537dd347111120ac06cf1488ee28b7b2 100644 (file)
@@ -8,11 +8,15 @@
     **/
 
    if(!isset($logged_in)) {
-      echo "You must <a href=\"login.php\">login</a> first.";
+      echo _("You must ");
+      echo "<a href=\"login.php\">";
+      echo _("login");
+      echo "</a>";
+      echo _(" first.";
       exit;
    }
    if(!isset($username) || !isset($key)) {
-      echo "You need a valid user and password to access this page!";
+      echo _("You need a valid user and password to access this page!");
       exit;
    }
 ?>
index 5c327e424ea5894b56374462e6574b79c5afd6c0..94abb2427293184222b3f30a00990d7dfe32c476 100644 (file)
    echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
    echo "   <TR BGCOLOR=DCDCDC WIDTH=100%>";
    echo "      <TD ALIGN=CENTER>";
-   echo "         <FONT FACE=\"Arial,Helvetica\"><B>Sign Out</B></FONT>";
+   echo "         <FONT FACE=\"Arial,Helvetica\"><B>";
+   echo _("Sign Out");
+   echo "</B></FONT>";
    echo "      </TD>";
    echo "   </TR>";
    echo "   <TR BGCOLOR=FFFFFF WIDTH=100%>";
    echo "      <TD ALIGN=CENTER>";
-   echo "         <FONT FACE=\"Arial,Helvetica\"><BR>You have been successfully signed out.<BR></FONT>";
-   echo "         <FONT FACE=\"Arial,Helvetica\">Click here to <A HREF=\"login.php\" TARGET=_top>log back in.</A></FONT><BR><BR>";
+   echo "         <FONT FACE=\"Arial,Helvetica\"><BR>";
+   echo _("You have been successfully signed out.");
+   echo "<BR></FONT>";
+   echo "         <FONT FACE=\"Arial,Helvetica\">";
+   echo _("Click here to ");
+   echo "<A HREF=\"login.php\" TARGET=_top>";
+   echo _("log back in.");
+   echo "</A></FONT><BR><BR>";
    echo "      </TD>";
    echo "   </TR>";
    echo "   <TR BGCOLOR=DCDCDC WIDTH=100%>";
index 05601d9eb01f5f1b38d769163a67149c404bda3d..e4faf4662407919ced41016d93c0fd0365f281d7 100644 (file)
@@ -7,7 +7,7 @@
     **/
 
    if(!isset($username)) {
-      echo "You need a valid user and password to access this page!";
+      echo _("You need a valid user and password to access this page!");
       exit;
    }