W3cubDocs

/Drupal 8

protected function StringTranslationTrait::formatPlural

protected StringTranslationTrait::formatPlural($count, $singular, $plural, array $args = array(), array $options = array())

Formats a string containing a count of items.

See also

\Drupal\Core\StringTranslation\TranslationInterface::formatPlural()

File

core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php, line 79

Class

StringTranslationTrait
Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface.

Namespace

Drupal\Core\StringTranslation

Code

protected function formatPlural($count, $singular, $plural, array $args = array(), array $options = array()) {
  return new PluralTranslatableMarkup($count, $singular, $plural, $args, $options, $this->getStringTranslation());
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StringTranslation!StringTranslationTrait.php/function/StringTranslationTrait::formatPlural/8.1.x