function PluralFormulaInterface::getNumberOfPlurals

Same name in other branches
  1. 8.9.x core/modules/locale/src/PluralFormulaInterface.php \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()
  2. 10 core/modules/locale/src/PluralFormulaInterface.php \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()
  3. 11.x core/modules/locale/src/PluralFormulaInterface.php \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()

Returns the number of plurals supported by a given language.

Parameters

null|string $langcode: (optional) The language code. If not provided, the current language will be used.

Return value

int Number of plural variants supported by the given language.

1 method overrides PluralFormulaInterface::getNumberOfPlurals()
PluralFormula::getNumberOfPlurals in core/modules/locale/src/PluralFormula.php
Returns the number of plurals supported by a given language.

File

core/modules/locale/src/PluralFormulaInterface.php, line 33

Class

PluralFormulaInterface
An interface for a service providing plural formulae.

Namespace

Drupal\locale

Code

public function getNumberOfPlurals($langcode = NULL);

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