Class Translator
Basic english only 'translator' for diffForHumans()
Namespace: Cake\Chronos
Property Summary
-
$strings public static
arrayTranslation strings.
Method Summary
-
exists() public
Check if a translation key exists.
-
plural() public
Get a plural message.
-
singular() public
Get a singular message.
Method Detail
exists() ¶ public
exists(string $key): bool
Check if a translation key exists.
Parameters
-
string$key The key to check.
Returns
boolplural() ¶ public
plural(string $key, int $count, array $vars = []): string
Get a plural message.
Parameters
-
string$key The key to use.
-
int$count The number of items in the translation.
-
array$vars optional Additional context variables.
Returns
stringsingular() ¶ public
singular(string $key, array $vars = []): string
Get a singular message.
Parameters
-
string$key The key to use.
-
array$vars optional Additional context variables.
Returns
string