1 Reply Latest reply on May 29, 2008 9:08 PM by (shane_mosier)

    Lost in tanslation

    Gabrinskie
      hi,
      in my site I need to translate all messages, but in the follow function I don't know how insert my variable:
      $trd['pass_match']
      intead of:
      "The two passwords do not match."

      //start Trigger_CheckPasswords trigger
      //remove this line if you want to edit the code by hand
      function Trigger_CheckPasswords(&$tNG) {
      $myThrowError = new tNG_ThrowError($tNG);
      $myThrowError->setErrorMsg("Passwords do not match.");
      $myThrowError->setField("ur_password");
      $myThrowError->setFieldErrorMsg("The two passwords do not match.");
      return $myThrowError->Execute();
      }
      //end Trigger_CheckPasswords trigger

      I used a SESSION variable.
      is there another way?

      SECOND QUESTION:
      Is there a way to add dummy hidden fields (not present in the database table) to a transaction to store any useful value?

      thanks
      Gabriele
        • 1. Re: Lost in tanslation
          Level 1
          Gabriele,

          Sorry for the late post here.

          Try this:

          //start Trigger_CheckPasswords trigger
          function Trigger_CheckPasswords(&$tNG) {
          $errorMessage = $_SESSION['passwordError'];
          $myThrowError = new tNG_ThrowError($tNG);
          $myThrowError->setErrorMsg("Passwords do not match.");
          $myThrowError->setField("ur_password");
          $myThrowError->setFieldErrorMsg("$errorMessage");
          return $myThrowError->Execute();
          }
          //end Trigger_CheckPasswords trigger

          To answer your second question, you can add dummy fields to grab values from forms that don't match up to fields in the database table.

          Shane