QVCI Library 3.1
 All Classes Namespaces Functions Variables
Public Member Functions | List of all members
Qvc_lang Class Reference

Public Member Functions

 init ()
 
 clear_cache ()
 
 set_lang ($lang)
 
 tt ($label, $args=array())
 
 tt_set ($arg1, $arg2=null)
 
 tx ($en)
 

Detailed Description

Provides multilingual support.

Member Function Documentation

Qvc_lang::clear_cache ( )

Clear the translation cache

Qvc_lang::init ( )

Initialization - Should be called by a post-constructor hook.

Qvc_lang::set_lang (   $lang)

Set the current user-interface language.

Parameters
string$langTwo-letter language code
Qvc_lang::tt (   $label,
  $args = array() 
)

Translate text, given a label and a list of substitutions

Parameters
string$label
array$args
Returns
string
Qvc_lang::tt_set (   $arg1,
  $arg2 = null 
)

Set translation text for a given label or set of labels.

Parameters
string | array$arg1Label or array of label => string
string$arg2Translation string
Qvc_lang::tx (   $en)

Translate a string directly NOTE this function is probably going to be deprecated because it is based on the old translation model. Accepts a variable argument list. The first arg is the label; the remaining args are substitutions.

Parameters
string$enThe input string

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