english/libraries/joomla/methods.php
/**
	 * Translates a string into the current language.
	 *
	 * Examples:
	 * <script>alert(Joomla.JText._('<?php echo JText::_("JDEFAULT", array("script"=>true));?>'));</script>
	 * will generate an alert message containing 'Default'
	 * <?php echo JText::_("JDEFAULT");?> it will generate a 'Default' string
	 *
	 * @param   string   $string                The string to translate.
	 * @param   mixed    $jsSafe                Boolean: Make the result javascript safe. array an array of option as described in the JText::sprintf function
	 * @param   boolean  $interpretBackSlashes  To interpret backslashes (\\=\, \n=carriage return, \t=tabulation)
	 * @param   boolean  $script                To indicate that the string will be push in the javascript language store
	 *
	 * @return  string  The translated string or the key is $script is true
	 * @since   11.1
	 *
	 */
Translates a string into the current language.
Examples:

will generate an alert message containing 'Default'
 it will generate a 'Default' string



@return  string  The translated string or the key is $script is true
@since   11.1
Translates a string into the current language . Examples : will generate an alert message containing ' Default ' it will generate a ' Default ' string @return string The translated string or the key is $script is true @since 11 . 1
public static function _($string, $jsSafe = false, $interpretBackSlashes = true, $script = false)
	{
		$lang = JFactory::getLanguage();
		if (is_array($jsSafe)) {
			if (array_key_exists('interpretBackSlashes', $jsSafe)) {
				$interpretBackSlashes = (boolean) $jsSafe['interpretBackSlashes'];
			}
			if (array_key_exists('script', $jsSafe)) {
				$script = (boolean) $jsSafe['script'];
			}
			if (array_key_exists('jsSafe', $jsSafe)) {
				$jsSafe = (boolean) $jsSafe['jsSafe'];
			}
			else {
				$jsSafe = false;
			}
		}
		if ($script) {
			self::$strings[$string] = $lang->_($string, $jsSafe, $interpretBackSlashes);
			return $string;
		}
		else {
			return $lang->_($string, $jsSafe, $interpretBackSlashes);
		}
	}
public static function _ ( $ string , $ jsSafe = false , $ interpretBackSlashes = true , $ script = false ) { $ lang = JFactory :: getLanguage ( ) ; if ( is_array ( $ jsSafe ) ) { if ( array_key_exists ( 'interpretBackSlashes' , $ jsSafe ) ) { $ interpretBackSlashes = ( boolean ) $ jsSafe [ 'interpretBackSlashes' ] ; } if ( array_key_exists ( 'script' , $ jsSafe ) ) { $ script = ( boolean ) $ jsSafe [ 'script' ] ; } if ( array_key_exists ( 'jsSafe' , $ jsSafe ) ) { $ jsSafe = ( boolean ) $ jsSafe [ 'jsSafe' ] ; } else { $ jsSafe = false ; } } if ( $ script ) { self :: $ strings [ $ string ] = $ lang -> _ ( $ string , $ jsSafe , $ interpretBackSlashes ) ; return $ string ; } else { return $ lang -> _ ( $ string , $ jsSafe , $ interpretBackSlashes ) ; } }
Translates a string into the current language.
Translates a string into the current language .