Hi
its actually part of a function (member).it might be difficult for you to grasp but here it is anyway:
function _( $str, $flags= 0 ) {
if (is_array($str)) {
$translated = array();
foreach ($str as $s)
$translated[] = $this->($s, $flags);
return implode(' ', $translated);
} else {
return $this->($str, $flags);
}
}
function __( $str, $flags = 0) {
global $dPconfig;
$str = trim($str);
if (empty( $str )) {
return '';
}
$x = @$GLOBALS['translate'][$str];
if ($x) {
$str = $x;
} else if (@$dPconfig['locale_warn']) {
if ($this->base_locale != $this->user_locale ||
($this->base_locale == $this->user_locale && !in_array( $str, @$GLOBALS['translate'] )) ) {
$str .= @$dPconfig['locale_alert'];
}
}
switch ($flags & UI_CASE_MASK) {
case UI_CASE_UPPER:
$str = strtoupper( $str );
break;
case UI_CASE_LOWER:
$str = strtolower( $str );
break;
case UI_CASE_UPPERFIRST:
$str = ucwords( $str );
break;
}
/* Altered to support multiple styles of output, to fix
* bugs where the same output style cannot be used succesfully
* for both javascript and HTML output.
* PLEASE NOTE: The default is currently UI_OUTPUT_HTML,
* which is different to the previous version (which was
* effectively UI_OUTPUT_RAW). If this causes problems,
* and they are localised, then use UI_OUTPUT_RAW in the
* offending call. If they are widespread, change the
* default to UI_OUTPUT_RAW and use the other options
* where appropriate.
* AJD - 2004-12-10
*/
global $locale_char_set;
if (! $locale_char_set) {
$locale_char_set = 'utf-8';
}
switch ($flags & UI_OUTPUT_MASK) {
case UI_OUTPUT_HTML:
$str = htmlentities(stripslashes($str), ENT_COMPAT, $locale_char_set);
break;
case UI_OUTPUT_JS:
$str = addslashes(stripslashes($str)); //, ENT_COMPAT, $locale_char_set);
break;
case UI_OUTPUT_RAW:
$str = stripslashes($str);
break;
}
return $str;
}
By the way the $str may either contain Username,Password or forgotPassword
Cheers