PHP Class Cake\Chronos\Translator

Afficher le fichier Open project: cakephp/chronos

Méthodes publiques

Свойство Type Description
$strings array Translation strings.

Méthodes publiques

Méthode 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 méthode

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

plural() public méthode

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.
Résultat string The translated message or ''.

singular() public méthode

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

Property Details

$strings public_oe static_oe property

Translation strings.
public static array $strings
Résultat array