aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/ConfigController.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2017-06-12 17:23:35 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-10-13 09:39:00 +0200
commitbe417ef23685e17a239b1d192a0e9b9f484f1bfe (patch)
tree22db3e6f8605f2cf3e9a7181ccd1524fbe4bdcac /src/Wallabag/CoreBundle/Controller/ConfigController.php
parent43b6f3a8a8173c47475632ca2869f190b552b5d6 (diff)
downloadwallabag-be417ef23685e17a239b1d192a0e9b9f484f1bfe.tar.gz
wallabag-be417ef23685e17a239b1d192a0e9b9f484f1bfe.tar.zst
wallabag-be417ef23685e17a239b1d192a0e9b9f484f1bfe.zip
Added possibility to change locale from login/register pages
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/ConfigController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php
index 242f557f..99576fbb 100644
--- a/src/Wallabag/CoreBundle/Controller/ConfigController.php
+++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php
@@ -330,6 +330,25 @@ class ConfigController extends Controller
330 } 330 }
331 331
332 /** 332 /**
333 * Change the locale for the current user.
334 *
335 * @param Request $request
336 * @param string $language
337 *
338 * @Route("/locale/{language}", name="changeLocale")
339 *
340 * @return \Symfony\Component\HttpFoundation\RedirectResponse
341 */
342 public function setLocaleAction(Request $request, $language = null)
343 {
344 if (null !== $language) {
345 $this->get('session')->set('_locale', $language);
346 }
347
348 return $this->redirect($request->headers->get('referer'));
349 }
350
351 /**
333 * Remove all tags for given tags and a given user and cleanup orphan tags. 352 * Remove all tags for given tags and a given user and cleanup orphan tags.
334 * 353 *
335 * @param array $tags 354 * @param array $tags