Copied!

TranslationServiceInterface

TranslationServiceInterface.php : 19
Interface

Methods

publictranslate()

TranslationServiceInterface.php : 31
public translate(mixed $context, TranslationProviderInterface $provider, string $sourceLanguage, string $targetLanguage) : array<string, mixed>

Parameters

Name Type Default value Description
$context mixed - -
$provider TranslationProviderInterface - -
$sourceLanguage string - -
$targetLanguage string - -

Return values

array<string, mixed>

Tags
Throws
TranslatorNotFoundException
Throws
SourceLanguageTranslationMissingException
Throws
TargetLanguageUnavailableException
Throws
LanguageCodeConversionException
Throws
ValidatorNotFoundException
Throws
InvalidArgumentException