CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C Chronos 1.x API

  • Project:
    • Chronos
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 1.x
      • 3.x
      • 2.x
      • 1.x

Namespaces

  • Global
  • Cake\Chronos

Class Translator

Basic english only 'translator' for diffForHumans()

Namespace: Cake\Chronos

Property Summary

  • $strings public static
    array

    Translation 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
bool

plural() ¶ 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
string

singular() ¶ 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

Property Detail

$strings ¶ public static

Translation strings.

Type
array
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs