src/mako/i18n/I18n.php
public function pluralize(string $word, ?int $count = null, ?string $language = null): string
	{
		$language = $language ?? $this->language;

		if(!isset($this->inflections[$language]))
		{
			$this->loadInflection($language);
		}

		if(empty($this->inflections[$language]))
		{
			throw new I18nException(vsprintf('The [ %s ] language pack does not include any inflection rules.', [$language]));
		}

		$pluralizer = $this->inflections[$language]['pluralize'];

		return $pluralizer($word, (int) $count, $this->inflections[$language]['rules']);
	}
public function pluralize(string $word, ?int $count = null, ?string $language = null): string
	{
		$language = $language ?? $this->language;

		if(!isset($this->inflections[$language]))
		{
			$this->loadInflection($language);
		}

		if(empty($this->inflections[$language]))
		{
			throw new I18nException(vsprintf('The [ %s ] language pack does not include any inflection rules.', [$language]));
		}

		$pluralizer = $this->inflections[$language]['pluralize'];

		return $pluralizer($word, (int) $count, $this->inflections[$language]['rules']);
	}
public function pluralize ( string $ word , ? int $ count = null , ? string $ language = null ) : string { $ language = $ language ?? $ this -> language ; if ( ! isset ( $ this -> inflections [ $ language ] ) ) { $ this -> loadInflection ( $ language ) ; } if ( empty ( $ this -> inflections [ $ language ] ) ) { throw new I18nException ( vsprintf ( 'The [ %s ] language pack does not include any inflection rules.' , [ $ language ] ) ) ; } $ pluralizer = $ this -> inflections [ $ language ] [ 'pluralize' ] ; return $ pluralizer ( $ word , ( int ) $ count , $ this -> inflections [ $ language ] [ 'rules' ] ) ; }
Returns the plural form of a noun.

@param  string                   $word     Noun to pluralize
@param  int|null                 $count    Number of nouns
@param  string|null              $language Language rules to use for pluralization
@throws \mako\i18n\I18nException
@return string
Returns the plural form of a noun .