public function getTranslationByOriginalLabel($originalLabel, I18n\Locale $locale, $pluralForm = null, $sourceName = 'Main', $packageKey = 'Neos.Flow')
{
$model = $this->getModel($packageKey, $sourceName, $locale);
if ($pluralForm !== null) {
$pluralFormsForProvidedLocale = $this->pluralsReader->getPluralForms($locale);
if (!is_array($pluralFormsForProvidedLocale) || !in_array($pluralForm, $pluralFormsForProvidedLocale)) {
throw new InvalidPluralFormException('There is no plural form "' . $pluralForm . '" in "' . (string) $locale . '" locale.', 1281033386);
}
// We need to convert plural form's string to index, as they are accessed using integers in XLIFF files
$pluralFormIndex = (int) array_search($pluralForm, $pluralFormsForProvidedLocale);
} else {
$pluralFormIndex = 0;
}
return $model->getTargetBySource($originalLabel, $pluralFormIndex);
}