english/libraries/joomla/methods.php
/**
	 * Translate a string into the current language and stores it in the JavaScript language store.
	 *
	 * @param   string   The JText key.
	 *
	 * @since   11.1
	 */
Translate a string into the current language and stores it in the JavaScript language store.
@param   string   The JText key.


Translate a string into the current language and stores it in the JavaScript language store . @param string The JText key .
public static function script($string = null, $jsSafe = false, $interpretBackSlashes = true)
	{
		if (is_array($jsSafe)) {
			if (array_key_exists('interpretBackSlashes', $jsSafe)) {
				$interpretBackSlashes = (boolean) $jsSafe['interpretBackSlashes'];
			}
			if (array_key_exists('jsSafe', $jsSafe)) {
				$jsSafe = (boolean) $jsSafe['jsSafe'];
			}
			else {
				$jsSafe = false;
			}
		}
		if ($string !== null) {
			self::$strings[strtoupper($string)] = JFactory::getLanguage()->_($string, $jsSafe, $interpretBackSlashes);
		}
		return self::$strings;
	}
public static function script ( $ string = null , $ jsSafe = false , $ interpretBackSlashes = true ) { if ( is_array ( $ jsSafe ) ) { if ( array_key_exists ( 'interpretBackSlashes' , $ jsSafe ) ) { $ interpretBackSlashes = ( boolean ) $ jsSafe [ 'interpretBackSlashes' ] ; } if ( array_key_exists ( 'jsSafe' , $ jsSafe ) ) { $ jsSafe = ( boolean ) $ jsSafe [ 'jsSafe' ] ; } else { $ jsSafe = false ; } } if ( $ string !== null ) { self :: $ strings [ strtoupper ( $ string ) ] = JFactory :: getLanguage ( ) -> _ ( $ string , $ jsSafe , $ interpretBackSlashes ) ; } return self :: $ strings ; }
Translate a string into the current language and stores it in the JavaScript language store.
Translate a string into the current language and stores it in the JavaScript language store .
// Add the string to the array if not null. // Normalize the key and translate the string.