public function getLangUrl() { if ($this->_lang_url === null) { $this->_lang_url = $this->getUrl(); $url_list = explode('/', $this->_lang_url); $lang_url = isset($url_list[1]) ? $url_list[1] : null; Lang::setCurrent($lang_url); if ($lang_url !== null && $lang_url === Lang::getCurrent()->url && strpos($this->_lang_url, Lang::getCurrent()->url) === 1) { $this->_lang_url = substr($this->_lang_url, strlen(Lang::getCurrent()->url) + 1); } } return $this->_lang_url; }