You are here

protected property DrupalDateTime::$formatTranslationCache in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Datetime/DrupalDateTime.php \Drupal\Core\Datetime\DrupalDateTime::formatTranslationCache

Formatted strings translation cache.

Translation cache represents an instance storage for formatted date strings. It contains a multidimensional array where:

  • first level keys - are drupal language codes;
  • second level keys - are each symbols of given format string (like 'F');
  • third level keys - are original matched strings related to the symbol;
  • values - are translated or not-translated original strings (depends on if a particular symbol represents translatable value according to PHP's date() format character).

For example:

[
  'en' => [
    'F' => [
      'November' => t('November'),
      'December' => t('December'),
    ],
    'd' => [
      '10' => '10',
      '31' => '31',
    ],
  ],
];

Type: array

File

core/lib/Drupal/Core/Datetime/DrupalDateTime.php, line 55

Class

DrupalDateTime
Extends DateTimePlus().

Namespace

Drupal\Core\Datetime

Code

protected $formatTranslationCache;