Zend Framework 2 passing variable to models
问题 I'm currently developing a multilangual website. For the multilangual part i use translator / poedit. I store the selected language in session. It works fine. Module.php: public function onBootstrap(MvcEvent $e) { // ... $session = new Container('base'); if ($session->language !== NULL) { $e->getApplication()->getServiceManager()->get('translator')->setLocale($session->language); } } Action for setting language in a controller: public function setLanguageAction() { $language = $this->params()