function TranslationInterface::selectPluralForm

Same name and namespace in other branches
  1. main core/lib/Drupal/Core/StringTranslation/TranslationInterface.php \Drupal\Core\StringTranslation\TranslationInterface::selectPluralForm()

Selects the plural form for a given count.

Parameters

int|float $count: The item count to display.

string $string: The translated string with plural forms delimited by PoItem::DELIMITER.

string|null $langcode: The language code to translate to. If it is NULL then the current language will be used.

Return value

string The plural form to use.

See also

\Drupal\Core\StringTranslation\TranslationManager::doTranslate()

1 method overrides TranslationInterface::selectPluralForm()
TranslationManager::selectPluralForm in core/lib/Drupal/Core/StringTranslation/TranslationManager.php

File

core/lib/Drupal/Core/StringTranslation/TranslationInterface.php, line 128

Class

TranslationInterface
Interface for the translation.manager translation service.

Namespace

Drupal\Core\StringTranslation

Code

public function selectPluralForm(int|float $count, string $string, ?string $langcode = NULL) : string;

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