From: Nicolas LÅ“uillet Date: Tue, 22 Jul 2014 16:01:27 +0000 (+0200) Subject: fix to display the login successful message with the translation X-Git-Tag: 1.8.0^2~20^2^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=9cf6bac1a502d1418834f4f7619d40eb65378c60;p=github%2Fwallabag%2Fwallabag.git fix to display the login successful message with the translation --- diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 09a9f5ff..2b0c3bf8 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -877,6 +877,14 @@ class Poche $longlastingsession = isset($_POST['longlastingsession']); $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login); Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user))); + + # reload l10n + $language = $user['config']['language']; + @putenv('LC_ALL=' . $language); + setlocale(LC_ALL, $language); + bindtextdomain($language, LOCALE); + textdomain($language); + $this->messages->add('s', _('welcome to your wallabag')); Tools::logm('login successful'); Tools::redirect($referer);