title: Set language of TYPO3 StandaloneView in CommandController
body: <p>I'm using the TYPO3\CMS\Fluid\View\StandaloneView in a CommandController to send emails to my fe_user.</p>
  
  <p>The part where im building the template looks like this:</p>
  
  <pre><code>    /* @var \TYPO3\CMS\Fluid\View\StandaloneView $emailView */
      $emailView = $this-&gt;objectManager-&gt;get( 'TYPO3\\CMS\\Fluid\\View\\StandaloneView' );
  
      // pass extension name to standaloneView for translations
      $extensionName = $this-&gt;request-&gt;getControllerExtensionName();
      $emailView-&gt;getRequest()-&gt;setControllerExtensionName( $extensionName );
  
      $extensionPath           = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath( 'my_extension' );
      $templatePathAndFilename = $extensionPath . 'Resources/Private/Templates/Email/' . $templateFile . '.html';
      $emailView-&gt;setLayoutRootPath( $extensionPath . 'Resources/Private/Layouts/Email/' );
      //$emailView-&gt;setPartialRootPath($ressourcePath . 'Partials/');
  
      $emailView-&gt;setTemplatePathAndFilename( $templatePathAndFilename );
  
      return $emailView-&gt;render();
  </code></pre>
  
  <p>Nothing special i think.</p>
  
  <p>In the html-Template i'm using the normal translate ViewHelper of Fluid:</p>
  
  <pre><code>&lt;f:translate key="LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:mail.text" /&gt;
  </code></pre>
  
  <p>This all works well in the standard language, but i've no idea how i can tell the View/CommandController <strong>which language to use</strong>. </p>
  
  <p>I'm not quite sure if this is a StandaloneView or a CommandController problem...</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>The posted snippet is called from the CommandController (Scheduler) - so there is no current frontend user (we are in backend environment). I get the user from a repository so i've to save the selected language in there. But then i've to set the language for the StandaloneView</p>