Neos\Flow\I18n\EelHelper\TranslationHelper::translateByExplicitlyPassedOrderedArguments PHP Method

translateByExplicitlyPassedOrderedArguments() protected method

Replace all placeholders with corresponding values if they exist in the translated label.
protected translateByExplicitlyPassedOrderedArguments ( string $id, string $originalLabel = null, array $arguments = [], string $source = 'Main', string $package = null, mixed $quantity = null, string $locale = null ) : string
$id string Id to use for finding translation (trans-unit id in XLIFF)
$originalLabel string The original translation value (the untranslated source string).
$arguments array Numerically indexed array of values to be inserted into placeholders
$source string Name of file with translations
$package string Target package key. If not set, the current package key will be used
$quantity mixed A number to find plural form for (float or int), NULL to not use plural forms
$locale string An identifier of locale to use (NULL for use the default locale)
return string Translated label or source label / ID key
    protected function translateByExplicitlyPassedOrderedArguments($id, $originalLabel = null, array $arguments = [], $source = 'Main', $package = null, $quantity = null, $locale = null)
    {
        $translationParameterToken = $this->createTranslationParameterToken($id);
        $translationParameterToken->value($originalLabel)->arguments($arguments)->source($source)->package($package)->quantity($quantity);
        if ($locale !== null) {
            $translationParameterToken->locale($locale);
        }
        return $translationParameterToken->translate();
    }