]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/ConfigController.php
Changed behavior when we change language
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / ConfigController.php
index 51d8bdd1fabfd70495d27418a016ae9a01d96a9e..46fb950342bbb97a6b59979709221e99569e8a7c 100644 (file)
@@ -2,8 +2,6 @@
 
 namespace Wallabag\CoreBundle\Controller;
 
-use FOS\UserBundle\Event\UserEvent;
-use FOS\UserBundle\FOSUserEvents;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Symfony\Component\HttpFoundation\JsonResponse;
@@ -40,6 +38,8 @@ class ConfigController extends Controller
             $em->persist($config);
             $em->flush();
 
+            $request->getSession()->set('_locale', $config->getLanguage());
+
             // switch active theme
             $activeTheme = $this->get('liip_theme.active_theme');
             $activeTheme->setName($config->getTheme());