I was working with symfony 2.0.12 but I have this problem: the page is not updated, always returns null.
public function cambiarlocaleAction($idioma)
{
$this->get('session')->setLocale($idioma);
$request = $this->get('request');
return new Response ($request->headers->get('referer'));
return $this->redirect($request->headers->get('referer'));
}
$request->headers->get('referer')
always null why? in symfony 2.0.14 work.