locale.plural.formula

Same name in other branches
  1. 8.9.x core/modules/locale/locale.services.yml \locale.plural.formula
  2. 10 core/modules/locale/locale.services.yml \locale.plural.formula
  3. 11.x core/modules/locale/locale.services.yml \locale.plural.formula

Class

Drupal\locale\PluralFormula
2 string references to locale.plural.formula
PluralTranslatableMarkup::getPluralIndex in core/lib/Drupal/Core/StringTranslation/PluralTranslatableMarkup.php
Gets the plural index through the gettext formula.
StringTranslationTrait::getNumberOfPlurals in core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php
Returns the number of plurals supported by a given language.

File

core/modules/locale/locale.services.yml

View source
  1. class: Drupal\locale\PluralFormula
  2. arguments:
  3. - '@language_manager'
  4. - '@state'

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.