public function chooseLanguage() {
        if ($this->_saveOnCookies &&
            $tmpLng = $this->getRequiredModules('cookies')->getCookie($this->_cookieName)
        ) {

            $this->_selectedLanguage = $tmpLng;
        } elseif (isset($this->_app)) {
            try {
                $this->_selectedLanguage = $this->_app->getConfig()->getConfigData('default_language');
            } catch (\pff\ConfigException $e) {
                $this->_selectedLanguage = $this->_defaultLang;
            }
        } else {
            $this->_selectedLanguage = $this->_defaultLang;
        }
    }