public function translateById($labelId, array $arguments = [], $quantity = null, Locale $locale = null, $sourceName = 'Main', $packageKey = 'Neos.Flow')
{
if ($locale === null) {
$locale = $this->localizationService->getConfiguration()->getCurrentLocale();
}
$pluralForm = $this->getPluralForm($quantity, $locale);
$translatedMessage = $this->translationProvider->getTranslationById($labelId, $locale, $pluralForm, $sourceName, $packageKey);
if ($translatedMessage === false) {
return null;
}
if (!empty($arguments)) {
return $this->formatResolver->resolvePlaceholders($translatedMessage, $arguments, $locale);
}
return $translatedMessage;
}