VirtueMart  3.2.14.9808
Static Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
vmText Class Reference

Static Public Member Functions

static setLanguage (&$l)
 
static _ ($string, $jsSafe=false, $interpretBackSlashes=true, $script=false)
 
static sprintf ($string)
 

Static Public Attributes

static $language = false
 

Static Protected Attributes

static $strings = array()
 

Member Function Documentation

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$stringThe string to translate.
mixed$jsSafeBoolean: Make the result javascript safe.
boolean$interpretBackSlashesTo interpret backslashes (\=\,
=carriage return, =tabulation)
boolean$scriptTo 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$stringThe format string.
Returns
string The translated strings or the key if 'script' is true in the array of options.
Since
11.1

Member Data Documentation

vmText::$language = false
static
vmText::$strings = array()
staticprotected

The documentation for this class was generated from the following file: