From 8a3258f595f2b9d37ad247efb34d43a808c42903 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 17 Jul 2012 18:22:51 +0200 Subject: [PATCH] Immediately changes the interface language if the active user changes their language --- .../install/files/lib/data/user/UserAction.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 682e40c5d3..58b532e2fa 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -151,6 +151,18 @@ class UserAction extends AbstractDatabaseObjectAction { public function update() { if (isset($this->parameters['data'])) { parent::update(); + + if (isset($this->parameters['data']['languageID'])) { + foreach ($this->objects as $object) { + if ($object->userID == WCF::getUser()->userID) { + if ($this->parameters['data']['languageID'] != WCF::getUser()->languageID) { + WCF::setLanguage($this->parameters['data']['languageID']); + } + + break; + } + } + } } else { if (!count($this->objects)) { -- 2.20.1