class JTextWrapper

Wrapper class for JText

Methods

string
_( string $string, mixed $jsSafe = false, boolean $interpretBackSlashes = true, boolean $script = false)

Helper wrapper method for _

string
alt( string $string, string $alt, mixed $jsSafe = false, boolean $interpretBackSlashes = true, boolean $script = false)

Helper wrapper method for alt

string
plural( string $string, integer $n)

Helper wrapper method for plural

string
sprintf( string $string)

Helper wrapper method for sprintf

mixed
printf( string $string)

Helper wrapper method for printf

string
script( string $string = null, boolean $jsSafe = false, boolean $interpretBackSlashes = true)

Helper wrapper method for script

Details

string _( string $string, mixed $jsSafe = false, boolean $interpretBackSlashes = true, boolean $script = false)

Helper wrapper method for _

Parameters

string $string The string to translate.
mixed $jsSafe Boolean: Make the result javascript safe.
boolean $interpretBackSlashes To interpret backslashes (\=\, \n=carriage return, \t=tabulation).
boolean $script To indicate that the string will be push in the javascript language store.

Return Value

string The translated string or the key if $script is true.

See also

\JText::_

string alt( string $string, string $alt, mixed $jsSafe = false, boolean $interpretBackSlashes = true, boolean $script = false)

Helper wrapper method for alt

Parameters

string $string The string to translate.
string $alt The alternate option for global string.
mixed $jsSafe Boolean: Make the result javascript safe.
boolean $interpretBackSlashes To interpret backslashes (\=\, \n=carriage return, \t=tabulation).
boolean $script To indicate that the string will be pushed in the javascript language store.

Return Value

string The translated string or the key if $script is true.

See also

\JText::alt

string plural( string $string, integer $n)

Helper wrapper method for plural

Parameters

string $string The format string.
integer $n The number of items.

Return Value

string The translated strings or the key if 'script' is true in the array of options.

See also

\JText::plural

string sprintf( string $string)

Helper wrapper method for sprintf

Parameters

string $string The format string.

Return Value

string The translated strings or the key if 'script' is true in the array of options.

See also

\JText::sprintf

mixed printf( string $string)

Helper wrapper method for printf

Parameters

string $string The format string.

Return Value

mixed

See also

\JText::printf

string script( string $string = null, boolean $jsSafe = false, boolean $interpretBackSlashes = true)

Helper wrapper method for script

Parameters

string $string The \JText key.
boolean $jsSafe Ensure the output is JavaScript safe.
boolean $interpretBackSlashes Interpret \t and \n.

Return Value

string

See also

\JText::script