Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
Translator Class Reference

Public Member Functions

 __construct (I18nTranslatorInterface $translator)
 
 __call ($method, array $args)
 Proxy unknown method calls to underlying translator instance.
 
 getTranslator ()
 
 translate ($message, $textDomain= 'default', $locale=null)
 Translate a message using the given text domain and locale.
 
 translatePlural ($singular, $plural, $number, $textDomain= 'default', $locale=null)
 Provide a pluralized translation of the given string using the given text domain and locale.
 

Protected Attributes

 $translator
 

Constructor & Destructor Documentation

__construct ( I18nTranslatorInterface  $translator)
Parameters
I18nTranslatorInterface$translator

Member Function Documentation

__call (   $method,
array  $args 
)

Proxy unknown method calls to underlying translator instance.

Note: this method is only implemented to keep backwards compatibility with pre-2.3.0 code.

Deprecated:
Parameters
string$method
array$args
Returns
mixed
getTranslator ( )
Returns
I18nTranslatorInterface
translate (   $message,
  $textDomain = 'default',
  $locale = null 
)

Translate a message using the given text domain and locale.

Parameters
string$message
string$textDomain
string$locale
Returns
string

Implements TranslatorInterface.

translatePlural (   $singular,
  $plural,
  $number,
  $textDomain = 'default',
  $locale = null 
)

Provide a pluralized translation of the given string using the given text domain and locale.

Parameters
string$singular
string$plural
string$number
string$textDomain
string$locale
Returns
string

Implements TranslatorInterface.

Member Data Documentation

$translator
protected