* @param integer $languageID
*/
public static final function setLanguage($languageID) {
+ if (!$languageID) $languageID = LanguageFactory::getInstance()->getDefaultLanguageID();
+
self::$languageObj = LanguageFactory::getInstance()->getLanguage($languageID);
self::getTPL()->setLanguageID(self::getLanguage()->languageID);
}
$this->languageID = $this->user->languageID;
$this->styleID = $this->user->styleID;
+ // change language
+ WCF::setLanguage($this->languageID ?: 0);
+
// in some cases the language id can be stuck in the session variables
$this->unregister('languageID');