english/libraries/joomla/methods.php
/**
	 * Passes a string thru a sprintf.
	 *
	 * @param   string  The format string.
	 * @param   mixed   Mixed number of arguments for the sprintf function.
	 * @param   array   optional Array of option array('jsSafe'=>boolean, 'interpretBackSlashes'=>boolean, 'script'=>boolean) where
	 *                  -jsSafe is a boolean to generate a javascript safe strings
	 *                  -interpretBackSlashes is a boolean to interpret backslashes \\->\, \n->new line, \t->tabulation
	 *                  -script is a boolean to indicate that the string will be push in the javascript language store
	 *
	 * @return  string  The translated strings or the key if 'script' is true in the array of options
	 * @since   11.1
	 */
Passes a string thru a sprintf.
@param   string  The format string.
@param   mixed   Mixed number of arguments for the sprintf function.

@return  string  The translated strings or the key if 'script' is true in the array of options
@since   11.1
Passes a string thru a sprintf . @param string The format string . @param mixed Mixed number of arguments for the sprintf function . @return string The translated strings or the key if ' script ' is true in the array of options @since 11 . 1
public static function sprintf($string)
	{
		$lang = JFactory::getLanguage();
		$args = func_get_args();
		$count = count($args);
		if ($count > 0) {
			if (is_array($args[$count-1])) {
				$args[0] = $lang->_($string, array_key_exists('jsSafe', $args[$count-1]) ? $args[$count-1]['jsSafe'] : false, array_key_exists('interpretBackSlashes', $args[$count-1]) ? $args[$count-1]['interpretBackSlashes'] : true);
				if (array_key_exists('script', $args[$count-1]) && $args[$count-1]['script']) {
					self::$strings[$string] = call_user_func_array('sprintf', $args);
					return $string;
				}
			}
			else {
				$args[0] = $lang->_($string);
			}
			return call_user_func_array('sprintf', $args);
		}
		return '';
	}
public static function sprintf ( $ string ) { $ lang = JFactory :: getLanguage ( ) ; $ args = func_get_args ( ) ; $ count = count ( $ args ) ; if ( $ count > 0 ) { if ( is_array ( $ args [ $ count - 1 ] ) ) { $ args [ 0 ] = $ lang -> _ ( $ string , array_key_exists ( 'jsSafe' , $ args [ $ count - 1 ] ) ? $ args [ $ count - 1 ] [ 'jsSafe' ] : false , array_key_exists ( 'interpretBackSlashes' , $ args [ $ count - 1 ] ) ? $ args [ $ count - 1 ] [ 'interpretBackSlashes' ] : true ) ; if ( array_key_exists ( 'script' , $ args [ $ count - 1 ] ) && $ args [ $ count - 1 ] [ 'script' ] ) { self :: $ strings [ $ string ] = call_user_func_array ( 'sprintf' , $ args ) ; return $ string ; } } else { $ args [ 0 ] = $ lang -> _ ( $ string ) ; } return call_user_func_array ( 'sprintf' , $ args ) ; } return '' ; }
Passes a string thru a sprintf.
Passes a string thru a sprintf .