|
static | setLanguage (&$l) |
|
static | _ ($string, $jsSafe=false, $interpretBackSlashes=true, $script=false) |
|
static | sprintf ($string) |
|
static vmText::_ |
( |
|
$string, |
|
|
|
$jsSafe = false , |
|
|
|
$interpretBackSlashes = true , |
|
|
|
$script = false |
|
) |
| |
|
static |
Translates a string into the current language. This just jText of joomla 2.5.x
Examples: <script>alert(Joomla.vmText._('<?php echo vmText::_("JDEFAULT", array("script"=>true));?>'));</script> will generate an alert message containing 'Default' <?php echo vmText::_("JDEFAULT");?> it will generate a 'Default' string
- Parameters
-
string | $string | The string to translate. |
mixed | $jsSafe | Boolean: Make the result javascript safe. |
boolean | $interpretBackSlashes | To interpret backslashes (\=\,
=carriage return, =tabulation) |
boolean | $script | To indicate that the string will be push in the javascript language store |
- Returns
- string The translated string or the key is $script is true
- Since
- 11.1
static vmText::setLanguage |
( |
& |
$l | ) |
|
|
static |
static vmText::sprintf |
( |
|
$string | ) |
|
|
static |
Passes a string thru a sprintf.
Note that this method can take a mixed number of arguments as for the sprintf function.
The last argument can take an array of options:
array('jsSafe'=>boolean, 'interpretBackSlashes'=>boolean, 'script'=>boolean)
where:
jsSafe is a boolean to generate a javascript safe strings. interpretBackSlashes is a boolean to interpret backslashes \->\,
->new line, ->tabulation. script is a boolean to indicate that the string will be push in the javascript language store.
- Parameters
-
string | $string | The format string. |
- Returns
- string The translated strings or the key if 'script' is true in the array of options.
- Since
- 11.1
vmText::$language = false |
|
static |
vmText::$strings = array() |
|
staticprotected |
The documentation for this class was generated from the following file:
- administrator/components/com_virtuemart/helpers/vmtext.php