JText::alt
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
Signature
public function alt(string
$string,
[string
$alt = false,
[mixed
$jsSafe = false,
[boolean
$interpretBackSlashes = true,
[boolean
$script = false]]]] )
Parameters
-
$string
- The string to translate.
-
$alt
- The alternate option for global string
-
$jsSafe
- Boolean: Make the result javascript safe.
-
$interpretBackSlashes
- To interpret backslashes (\\=\, \n=carriage return, \t=tabulation)
-
$script
- To indicate that the string will be pushed in the javascript language store
Returns
- string
- The translated string or the key if $script is true