public function getLocale() { if ($this->request->hasCookie('locale')) { return $this->request->cookie('locale'); } else { return $this->getConfigDefaultLocale(); } }