DrupalDateTime::$formatTranslationCache
Same name in other branches
- 9 core/lib/Drupal/Core/Datetime/DrupalDateTime.php \Drupal\Core\Datetime\DrupalDateTime::formatTranslationCache
- 8.9.x core/lib/Drupal/Core/Datetime/DrupalDateTime.php \Drupal\Core\Datetime\DrupalDateTime::formatTranslationCache
- 10 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 58
Class
- DrupalDateTime
- Extends DateTimePlus().
Namespace
Drupal\Core\DatetimeCode
protected $formatTranslationCache = [];
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.