Stud.IP  jlu_4.1 Revision
I18N Class Reference
Collaboration diagram for I18N:
Collaboration graph

Static Public Member Functions

static input ($name, $value, $attributes=[])
 
static inputTmpl ($tmpl, $name, $value, $tmpl_attributes=[])
 
static textarea ($name, $value, $attributes=[])
 
static textareaTmpl ($tmpl, $name, $value, $tmpl_attributes=[])
 
static isEnabled ()
 

Detailed Description

Translation class

Automatic generation of inputs and textareas for i18n

Member Function Documentation

◆ input()

static input (   $name,
  $value,
  $attributes = [] 
)
static

Creates a set of HTML input elements for this form element in text form. One element will be generated for each configured content language.

Parameters
string$nameHTML name of the Inputfild
I18NString$value(Needs to be an i18n input string)
array$attributesAdditional attributes of the input
Returns
string Crafted input
Here is the call graph for this function:

◆ inputTmpl()

static inputTmpl (   $tmpl,
  $name,
  $value,
  $tmpl_attributes = [] 
)
static

Returns a widget used in HTML forms to handle translated values in a textline (normally a input form element). The design of this widget has to be defined by the given template.

Parameters
Flexi_Template|stringAn template or a path to the template file.
string$nameHTML name of the Inputfild
I18NString$value(Needs to be an i18n input string)
array$attributesAdditional attributes of the input
Returns
string Crafted input
Here is the caller graph for this function:

◆ isEnabled()

static isEnabled ( )
static

Returns whether the i18n functionality is enabeld i.e. more than the default language is configured in config_defaults.inc.php.

Returns
bool True if i18n is enabled.
Here is the caller graph for this function:

◆ textarea()

static textarea (   $name,
  $value,
  $attributes = [] 
)
static

Create a set of HTML textarea elements for this form element in text form. One element will be generated for each configured content language.

Parameters
string$nameHTML name of the Textarea
I18NString$value(Needs to be an i18n input string)
array$attributesAdditional attributes of the input
Returns
string Crafted textarea
Here is the call graph for this function:

◆ textareaTmpl()

static textareaTmpl (   $tmpl,
  $name,
  $value,
  $tmpl_attributes = [] 
)
static

Returns a widget used in HTML forms to handle translated values in a multiline textarea (normally a textarea form element). The design of this widget has to be defined by the given template.

Parameters
Flexi_Template | string$tmplAn template or a path to the template file.
string$nameHTML name of the Textarea
I18NString$value(Needs to be an i18n input string)
array$attributesAdditional attributes of the input
Returns
string Crafted textarea
Here is the call graph for this function:

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