Improve locale handling

This commit is contained in:
Pierre Rudloff 2017-05-30 23:30:21 +02:00
parent b4dd0aeb29
commit 0f80cbd333
7 changed files with 118 additions and 16 deletions

View file

@ -6,6 +6,7 @@
namespace Alltube\Controller;
use Alltube\Config;
use Alltube\Locale;
use Alltube\PasswordException;
use Alltube\VideoDownload;
use Psr\Container\ContainerInterface;
@ -126,7 +127,7 @@ class FrontController
*/
public function locale(Request $request, Response $response, array $data)
{
$this->locale->setLocale($data['locale']);
$this->locale->setLocale(new Locale($data['locale']));
return $response->withRedirect($this->container->get('router')->pathFor('index'));
}