/** * Sets the locale. * @param string $locale */ public function setLocale($locale) { $this->locale = $locale; if ($this->hasSession()) { $this->session->set('locale', $this->locale); } return $this; }