Redirect to the front page with a different language
You can try this code 

 &lt;?php

 use Drupal\Core\Url;
 use Symfony\Component\HttpFoundation\RedirectResponse;

 $language = Drupal::languageManager()-&gt;getLanguage('vi');
 $url = Url::fromRoute('&lt;front&gt;', [], ['language' =&gt; $language]);
 $response = new RedirectResponse($url-&gt;toString());
 $response-&gt;send();