diff --git a/classes/controller.php b/classes/controller.php index 53d9380f..86bcac90 100644 --- a/classes/controller.php +++ b/classes/controller.php @@ -1036,13 +1036,12 @@ class AdminController protected function taskSwitchlanguage() { $language = $this->grav['uri']->param('lang'); + $redirect = $this->grav['uri']->param('redirect') ? 'pages/' . $this->grav['uri']->param('redirect') : 'pages'; if ($language) { $this->grav['session']->admin_lang = $language ?: 'en'; } - $redirect = 'pages'; - $this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.SUCCESSFULLY_SWITCHED_LANGUAGE'), 'info'); $this->setRedirect($redirect); diff --git a/themes/grav/templates/pages.html.twig b/themes/grav/templates/pages.html.twig index 15b72b6e..ff89fbdf 100644 --- a/themes/grav/templates/pages.html.twig +++ b/themes/grav/templates/pages.html.twig @@ -119,6 +119,24 @@ {% endif %} + {% if admin.multilang %} +
+ {% endif %} {% endif %} {% if mode == 'new' %}