X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2Fcontrollers%2Fplugins%2FSyjLocale.php;h=52dd4919718437fed82586702fea902a25c6cbb0;hp=19af8ec77e5409e7985f9dca0e260e95699f99ac;hb=627f937d7241dc4b9311759fa446c3738d05f5a9;hpb=bd3de07b5ee90369741ef197230b4744f33eeda1 diff --git a/application/controllers/plugins/SyjLocale.php b/application/controllers/plugins/SyjLocale.php index 19af8ec..52dd491 100644 --- a/application/controllers/plugins/SyjLocale.php +++ b/application/controllers/plugins/SyjLocale.php @@ -7,11 +7,14 @@ class Syj_Controllers_Plugins_SyjLocale extends Zend_Controller_Plugin_Abstract public function preDispatch(Zend_Controller_Request_Abstract $request) { $lang = $request->getQuery('lang'); - if (is_null($lang)) { - return; + + if ($lang) { + setcookie("syj_lang", $lang, 0, "", "", false, true); + } else { + $lang = $request->getCookie('syj_lang'); } - if (!Zend_Registry::isRegistered('Zend_Translate')) { + if (!$lang) { return; }