Set interface language depending on page language
authorMarcel Werk <burntime@woltlab.com>
Mon, 26 Dec 2016 16:21:32 +0000 (17:21 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 26 Dec 2016 16:21:32 +0000 (17:21 +0100)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index fb99967da0fc8c0090fe1d7d187e628efff43144..446ffe75a1e29d5936d0e7978245602ec6022561 100644 (file)
@@ -162,6 +162,10 @@ class RequestHandler extends SingletonFactory {
                                        'languageID' => $routeData['cmsPageLanguageID']
                                ];
                                
+                               if ($routeData['cmsPageLanguageID'] && $routeData['cmsPageLanguageID'] != WCF::getLanguage()->languageID) {
+                                       WCF::setLanguage($routeData['cmsPageLanguageID']);
+                               }
+                               
                                unset($routeData['cmsPageID']);
                                unset($routeData['cmsPageLanguageID']);
                        }