In Symfony 6.1, the LocaleSwitcher has been added for this use case.
use Symfony\Component\Translation\LocaleSwitcher;
...
$this->localeSwitcher->setLocale($documentData->getLocale());
try {
$html = $this->templating->render('admin/request/pdf/document.pdf.twig', [
'data' => $data,
]);
} finally {
$this->localeSwitcher->reset();
}
See https://symfony.com/doc/current/translation.html#switch-locale-programmatically