diff options
author | robocoder <anthon.pang@gmail.com> | 2010-03-31 09:38:24 +0400 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2010-03-31 09:38:24 +0400 |
commit | 3b99f0b0a4094addc88ae35b381d78a0bf1888e3 (patch) | |
tree | 75ac9e1d45c90a96dabc880710bf8ba868c0b590 | |
parent | 75873c86f7a3d9442ab59fa04e78c7888cb755f0 (diff) |
fixes #835 - optional language param to select translation
git-svn-id: http://dev.piwik.org/svn/trunk@2022 59fd770c-687e-43c8-a1e3-f5a4ff64c105
-rw-r--r-- | core/Translate.php | 4 | ||||
-rw-r--r-- | plugins/CoreUpdater/Controller.php | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/Translate.php b/core/Translate.php index da2a09410e..161fa737b8 100644 --- a/core/Translate.php +++ b/core/Translate.php @@ -74,9 +74,11 @@ class Piwik_Translate { return $language; } + Piwik_PostEvent('Translate.getLanguageToLoad', $language); - if(is_null($language) || empty($language)) + $language = Piwik_Common::getRequestVar('language', is_null($language) ? '' : $language, 'string'); + if(empty($language)) { $language = Zend_Registry::get('config')->General->default_language; } diff --git a/plugins/CoreUpdater/Controller.php b/plugins/CoreUpdater/Controller.php index c5b2fd1952..3c972a8670 100644 --- a/plugins/CoreUpdater/Controller.php +++ b/plugins/CoreUpdater/Controller.php @@ -196,7 +196,6 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller if(!empty($language)) { Piwik_LanguagesManager_API::getInstance()->setLanguageForSession($language); - Piwik::redirectToModule('CoreUpdater', 'index', array('language' => null)); } $this->runUpdaterAndExit(); } |