class JText


Located at : UKNOWVA_ROOT/libraries/joomla/methods.php

Text handling class.

Methods

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

Translates a string into the current language.

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

Translates a string into the current language.

static string
plural($string, $n)

Like JText::sprintf but tries to pluralise the string.

static string
sprintf($string)

Passes a string thru a sprintf.

static mixed
printf($string)

Passes a string thru an printf.

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

Translate a string into the current language and stores it in the JavaScript language store.

Details

at line 133
static string _(string $string, mixed $jsSafe = false, boolean $interpretBackSlashes = true, boolean $script = false)

Translates a string into the current language.

Examples:

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

Parameters

string $string The string to translate.
mixed $jsSafe Boolean: Make the result javascript safe. array an array of option as described in the JText::sprintf function
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 is $script is true

at line 176
static string alt(string $string, string $alt, mixed $jsSafe = false, boolean $interpretBackSlashes = true, boolean $script = false)

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

Parameters

string $string The string to translate.
string $alt The alternate option for global string
mixed $jsSafe Boolean: Make the result javascript safe. array an array of option as described in the JText::sprintf function
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

at line 205
static string plural($string, $n)

Like JText::sprintf but tries to pluralise the string.

Examples: will generate an alert message containing '1 plugin successfully disabled' it will generate a '1 plugin successfully disabled' string

Parameters

$string
$n

Return Value

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

at line 261
static string sprintf($string)

Passes a string thru a sprintf.

Parameters

$string

Return Value

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

at line 292
static mixed printf($string)

Passes a string thru an printf.

Parameters

$string

Return Value

mixed

at line 316
static script($string = null, $jsSafe = false, $interpretBackSlashes = true)

Translate a string into the current language and stores it in the JavaScript language store.

Parameters

$string
$jsSafe
$interpretBackSlashes