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; Language::setCurrent($lang_url); if ($lang_url !== null && $lang_url === Language::getCurrent()->url_key && strpos($this->_lang_url, Language::getCurrent()->url_key) === 1) { $this->_lang_url = substr($this->_lang_url, strlen(Language::getCurrent()->url_key) + 1); } } return $this->_lang_url; }