You are here

function PHPMailer::SetLanguage in SMTP Authentication Support 5

Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English.

@access public

Parameters

string $lang_type Type of language (e.g. Portuguese: "br"):

string $lang_path Path to the language file directory:

Return value

bool

1 call to PHPMailer::SetLanguage()
PHPMailer::Lang in ./smtp.module
Returns a message in the appropriate language. @access private

File

./smtp.module, line 1047
Enables drupal to send email directly to an SMTP server using authentication. Uses the PHPMailer class by Brent R. Matzelle.

Class

PHPMailer
PHPMailer - PHP email transport class @package PHPMailer @author Brent R. Matzelle @copyright 2001 - 2003 Brent R. Matzelle

Code

function SetLanguage($lang_type, $lang_path = "language/") {

  /*
          if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php'))
              include($lang_path.'phpmailer.lang-'.$lang_type.'.php');
          else if(file_exists($lang_path.'phpmailer.lang-en.php'))
              include($lang_path.'phpmailer.lang-en.php');
          else
          {
              $this->SetError("Could not load language file");
              return false;
          }*/
  $this->language = _smtp_initialize_language();
  return true;
}