Registry /
utility / symfony-translation-contracts
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
TranslatorInterface
✓ use Symfony\Contracts\Translation\TranslatorInterface;
Injects the translator interface and translates a message.
use Symfony\Contracts\Translation\TranslatorInterface;
class MyService {
public function __construct(private TranslatorInterface $translator) {}
public function greet(): string {
return $this->translator->trans('hello');
}
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.