PHP Class Cake\Chronos\Translator

Datei anzeigen Open project: cakephp/chronos

Public Properties

Property Type Description
$strings array Translation strings.

Public Methods

Method Description
exists ( string $key ) : boolean Check if a translation key exists.
plural ( string $key, string $count, array $vars = [] ) : string Get a plural message.
singular ( string $key, array $vars = [] ) : string Get a singular message.

Method Details

exists() public method

Check if a translation key exists.
public exists ( string $key ) : boolean
$key string The key to check.
return boolean Whether or not the key exists.

plural() public method

Get a plural message.
public plural ( string $key, string $count, array $vars = [] ) : string
$key string The key to use.
$count string The number of items in the translation.
$vars array Additional context variables.
return string The translated message or ''.

singular() public method

Get a singular message.
public singular ( string $key, array $vars = [] ) : string
$key string The key to use.
$vars array Additional context variables.
return string The translated message or ''.

Property Details

$strings public_oe static_oe property

Translation strings.
public static array $strings
return array