english/libraries/joomla/methods.php
/**
	 * Translates a string into the current language.
	 *
	 * Examples:
	 * <?php echo JText::alt("JALL","language");?> it will generate a 'All' string in English but a "Toutes" string in French
	 * <?php echo JText::alt("JALL","module");?> it will generate a 'All' string in English but a "Tous" string in French
	 *
	 * @param   string    $string                The string to translate.
	 * @param   string    $alt                   The alternate option for global string
	 * @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 pushed in the javascript language store
	 *
	 * @return  string    The translated string or the key if $script is true
	 * @since   11.1
	 *
	 */
Translates a string into the current language.
Examples:
 it will generate a 'All' string in English but a "Toutes" string in French
 it will generate a 'All' string in English but a "Tous" string in French



@return  string    The translated string or the key if $script is true
@since   11.1
Translates a string into the current language . Examples : it will generate a ' All ' string in English but a " Toutes " string in French it will generate a ' All ' string in English but a " Tous " string in French @return string The translated string or the key if $script is true @since 11 . 1
public static function alt($string, $alt, $jsSafe = false, $interpretBackSlashes = true, $script = false)
	{
		$lang = JFactory::getLanguage();
		if ($lang->hasKey($string.'_'.$alt)) {
			return self::_($string.'_'.$alt, $jsSafe, $interpretBackSlashes);
		}
		else {
			return self::_($string, $jsSafe, $interpretBackSlashes);
		}
	}
public static function alt ( $ string , $ alt , $ jsSafe = false , $ interpretBackSlashes = true , $ script = false ) { $ lang = JFactory :: getLanguage ( ) ; if ( $ lang -> hasKey ( $ string . '_' . $ alt ) ) { return self :: _ ( $ string . '_' . $ alt , $ jsSafe , $ interpretBackSlashes ) ; } else { return self :: _ ( $ string , $ jsSafe , $ interpretBackSlashes ) ; } }
Translates a string into the current language.
Translates a string into the current language .