Drupal 8  8.0.2
DrupalTranslator Class Reference
Inheritance diagram for DrupalTranslator:

Public Member Functions

 trans ($id, array $parameters=array(), $domain=NULL, $locale=NULL)
 
 transChoice ($id, $number, array $parameters=array(), $domain=NULL, $locale=NULL)
 
 setLocale ($locale)
 
 getLocale ()
 

Protected Member Functions

 processParameters (array $parameters)
 
 getOptions ($domain=NULL, $locale=NULL)
 

Protected Attributes

 $locale
 

Detailed Description

Translates strings using Drupal's translation system.

This class is used by the Symfony validator to translate violation messages.

Member Function Documentation

getLocale ( )

{}

References Drupal\languageManager().

Here is the call graph for this function:

getOptions (   $domain = NULL,
  $locale = NULL 
)
protected

Returns options suitable for use with t().

Referenced by DrupalTranslator\trans(), and DrupalTranslator\transChoice().

Here is the caller graph for this function:

processParameters ( array  $parameters)
protected

Processes the parameters array for use with t().

Referenced by DrupalTranslator\trans(), and DrupalTranslator\transChoice().

Here is the caller graph for this function:

setLocale (   $locale)

{}

trans (   $id,
array  $parameters = array(),
  $domain = NULL,
  $locale = NULL 
)

{}

References DrupalTranslator\getOptions(), DrupalTranslator\processParameters(), and t().

Here is the call graph for this function:

transChoice (   $id,
  $number,
array  $parameters = array(),
  $domain = NULL,
  $locale = NULL 
)

{}

References DrupalTranslator\getOptions(), and DrupalTranslator\processParameters().

Here is the call graph for this function:


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