Improve locale handling
This commit is contained in:
parent
b4dd0aeb29
commit
0f80cbd333
7 changed files with 118 additions and 16 deletions
|
@ -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'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue