Issue #3029841 by kirkkala: Language API PHP example bug and coding standard violation

8.7.x
Nathaniel Catchpole 2019-02-07 14:50:57 +00:00
parent affa4ca69c
commit 8a664f09c1
1 changed files with 2 additions and 2 deletions

View File

@ -110,9 +110,9 @@ use Drupal\Core\Language\LanguageInterface;
* translation in the user interface: * translation in the user interface:
* @code * @code
* // PHP code * // PHP code
* t('May', array(), array('context' => 'Long month name'); * t('May', [], ['context' => 'Long month name']);
* \Drupal::translation()->formatPlural($count, '1 something', * \Drupal::translation()->formatPlural($count, '1 something',
* '@count somethings', array(), array('context' => 'My context')); * '@count somethings', [], ['context' => 'My context']);
* *
* // JavaScript code * // JavaScript code
* Drupal.t('May', {}, {'context': 'Long month name'}); * Drupal.t('May', {}, {'context': 'Long month name'});