]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix to display the login successful message with the translation 783/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 22 Jul 2014 16:01:27 +0000 (18:01 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 22 Jul 2014 16:01:27 +0000 (18:01 +0200)
inc/poche/Poche.class.php

index 09a9f5ff85276423a29b505312d2f1cec66ead8a..2b0c3bf8d67e51df0433f1fa710b5c0959330d54 100755 (executable)
@@ -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);