]> SAFE projects GIT repository - jmp/mailleur/commitdiff
translation seems to be working
authorJean-Marc Pigeon <jmp@safe.c>
Sat, 6 Sep 2025 14:34:11 +0000 (10:34 -0400)
committerJean-Marc Pigeon <jmp@safe.c>
Sat, 6 Sep 2025 14:34:11 +0000 (10:34 -0400)
www/gesdis.php
www/lvllog.php
www/unilng.php

index 7a282c2094ba4981fd6273d34e09e71ea2017cbe..8f2851d942c1b0ddf2d02bd67e72bf6dbbea4f2f 100644 (file)
@@ -15,6 +15,8 @@ include_once "unilng.php";
 function topper($isadmin,$logname,$pageref)
 
 {
+global $userlang;
+
 $entete="";
 $admcolor="black";
 $click1="";
@@ -24,7 +26,7 @@ if ($isadmin==true)
   $admcolor="red";
 switch ($pageref) {
   case "lvllog"        :
-    $entete=gettranslate(lng::fra,"authentication");
+    $entete=gettranslate($userlang,"Authentication");
     //$entete=gettranslate(lng::fra,"nuts");
     break;
   case "lvlmai"        :
index e9fe253d24bb463b974d66dfd8dd408d5979af13..8632500b4d9bc439b3bf93c7e406cca2f6ab73f2 100644 (file)
@@ -7,6 +7,7 @@
 //==============================================================
 include_once "subrou.php";
 include_once "unienv.php";
+include_once "unilng.php";
 include_once "gesdis.php";
 include_once "gessql.php";
 
@@ -18,6 +19,12 @@ include_once "gessql.php";
 function login()
 
 {
+global  $userlang;
+
+$lngemail=gettranslate($userlang,"Email");
+$lngpass=gettranslate($userlang,"Password");
+$lngshow=gettranslate($userlang,"Show");
+
 $STR  = <<<EOT
 
 <script>
@@ -34,12 +41,14 @@ if (datain.type==="password") {
   datain.type="text";
   }
 else {
-  datain.type = "password";
+  datain.type="password";
   }
 }
+
 </script>
 
-<table border="0" align="center" width="350" cellpadding="0" cellspacing="0">
+
+<table border="0" align="center" width="400" cellpadding="0" cellspacing="0">
     <tr>
       <td><img src="/reg-icons/login.gif" alt="" border="0" /></td>
     </tr>
@@ -53,19 +62,19 @@ else {
                  action="lvllog.php"
                  enctype="application/x-www-form-urlencoded"
                  name="login">
-              <table align="center" border="0" cellspacing="2" cellpadding="0">
+              <table align="center" border="0" cellspacing="5" cellpadding="0">
                 <tr>
-                  <td align="left" nowrap="nowrap">Email:</td>
+                  <td align="left" nowrap="nowrap">$lngemail:</td>
                   <td>
                  <input type="text" name="email" size="20" onchange="" />
                  </td>
                 </tr>
 
                 <tr>
-                  <td align="left" nowrap="nowrap">Password:</td>
+                  <td align="left" nowrap="nowrap">$lngpass:</td>
                   <td>
                  <input type="password" name="passwd" size="20" id="myInput" />
-                 <input type="checkbox" onclick="showpass()">Show
+                 <input type="checkbox" onclick="showpass()" >$lngshow
                  </td>
                 </tr>
               </table>
@@ -122,7 +131,7 @@ $STR  = <<<EOT
 </HEAD>
 <BODY="white">
 
-<CENTER><STRONG><FONT SIZE=+2 color=red>
+<CENTER><STRONG><FONT SIZE=+2>
 $top
 </FONT></STRONG></CENTER>
 $login
@@ -134,6 +143,7 @@ EOT;
 return $STR;
 }
 
+$userlang=lng::fra;
 if ($_SERVER["REQUEST_METHOD"] == "POST") {
   $pass=$_POST["passwd"];
   $logname=$_POST["email"];
index 4e1d72ac2c039c70038a183d2f2f80336b56ce78..b2fc022887e0d8ccee788087cc2e6b1cf867c2c8 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 //==============================================================
 //
 //     To manage language
@@ -14,18 +13,24 @@ enum lng {
   case unk;    //Unk language (english)
   }
 
-
+$userlang=lng::eng;
 
 
 function gettranslate(lng $lang,$mot)
 
 {
 $english =array        (
-               "authentication"
+               "Show",
+               "Password",
+               "Email",
+               "Authentication"
                );
 
 $francais=array        (
-               "authentification"
+               "Afficher",
+               "Mot de Passe",
+               "Courriel",
+               "Authentification"
                );
 
 $translate=$mot;