Retursn the default language object

@return mixed stdClass on success, false on failure
504877
public function getDefault()
    {
        $sDefault  = $this->oCi->config->item('languages_default');
        $oLanguage = $this->getByCode($sDefault);

        return !empty($oLanguage) ? $oLanguage : false;
    }
1041707
public function getCustomerLang()
    {
        $lang = $this->getLangModel();

        if ($lang === null) {
            $lang = (new LangQuery)
                ->filterByByDefault(1)
                ->findOne()
            ;
        }

        return $lang;
    }
326979
public static function getLanguage()
	{
		if (!self::$language)
		{
			$locale = Config::get()->get('language.language');
			$debug = Config::get()->get('language.debug');
			self::$language = Language::getInstance($locale, $debug);

			Text::setLanguage(self::$language);
		}
		return self::$language;
	}
589644
public function lang_menu() {
        global $CFG;

        if (empty($CFG->langmenu)) {
            return '';
        }

        if ($this->page->course != SITEID and !empty($this->page->course->lang)) {
            // do not show lang menu if language forced
            return '';
        }

        $currlang = current_language();
        $langs = get_string_manager()->get_list_of_translations();

        if (count($langs) < 2) {
            return '';
        }

        $s = new single_select($this->page->url, 'lang', $langs, $currlang, null);
        $s->label = get_accesshide(get_string('language'));
        $s->class = 'langmenu';
        return $this->render($s);
    }
105669
public static function getDefaultLanguage()
    {
        if (null === self::$defaultLanguage) {
            self::$defaultLanguage = LangQuery::create()->findOneByByDefault(1);

            if (null === self::$defaultLanguage) {
                throw new \RuntimeException("No default language is defined. Please define one.");
            }
        }

        return self::$defaultLanguage;
    }
264530
public function getLanguage()
    {
        if ($this->language)
            return $this->language;
        if ($this->defaultLanguage)
            return $this->defaultLanguage;
        $prefered = $this->getPreferredLanguage();
        if (in_array($prefered, $this->availableLanguages))
            return $prefered;
        return $this->availableLanguages[0]; // if nothing works return first language from the list
    }
413463
public function getLanguage()
    {
        /** @var Session $oSession */
        $oSession = $this->getInstance("Session");
        /** @var Utilities $oUtils */
        $oUtils = $this->getInstance("Utilities");

        $iLanguage = $oUtils->getRequestVar("setup_lang", "post");

        if (isset($iLanguage)) {
            $oSession->setSessionParam('setup_lang', $iLanguage);
            $iLanguageSubmit = $oUtils->getRequestVar("setup_lang_submit", "post");
            if (isset($iLanguageSubmit)) {
                //updating setup language, so disabling redirect to next step, just reloading same step
                $_GET['istep'] = $_POST['istep'] = $this->getInstance("Setup")->getStep('STEP_WELCOME');
            }
        } elseif ($oSession->getSessionParam('setup_lang') === null) {
            $aLangs = ['en', 'de'];
            $sBrowserLang = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));
            $sBrowserLang = (in_array($sBrowserLang, $aLangs)) ? $sBrowserLang : $aLangs[0];
            $oSession->setSessionParam('setup_lang', $sBrowserLang);
        }

        return $oSession->getSessionParam('setup_lang');
    }
63831
protected function LoadLanguage()
    {
        if (is_object($this->config['language'])) {
            $l = $this->config['language'];
        } else {
            $languages = array(
                $this->config['language'],
                '\RelativeTime\Languages\\' . $this->config['language'],
            );

            $l = null;
            foreach ($languages as $lang) {
                if (class_exists($lang)) {
                    $l = new $lang();
                    break;
                }
            }
        }

        if ($l instanceof ArrayAccess) {
            return $l;
        }

        return new English();
    }
226449
protected function initDefault()
    {
        if ($this->isCli()) {
            return null;
        }

        $uri = (empty($_SERVER['HTTPS']) ? 'http' : 'https')
            . '://'
            . $_SERVER['HTTP_HOST']
            . $_SERVER['REQUEST_URI'];
        return  rtrim(preg_replace('/\?.*/', '', $uri), '/');
    }
543248
public function getLanguage(string $default = null): string {
    $language = $default ?: 'en';

    if (TYPO3_MODE === 'FE') {
      if (isset($GLOBALS['TSFE']->lang)) {
        $language = $GLOBALS['TSFE']->lang;
      }
    } elseif (is_object($GLOBALS['LANG'])) {
      if (isset($GLOBALS['LANG']->lang)) {
        $language = $GLOBALS['LANG']->lang;
      }
    }

    // if (TYPO3_MODE === 'FE') {
    //   if (isset($GLOBALS['TSFE']->config['config']['language'])) {
    //     $language = $GLOBALS['TSFE']->config['config']['language'];
    //   }
    // } elseif (strlen($GLOBALS['BE_USER']->uc['lang']) > 0) {
    //   $language = $GLOBALS['BE_USER']->uc['lang'];
    // }

    return $language;
  }
1001427
public static function getLanguageForSession()
    {
        $cookieName = Config::getInstance()->General['language_cookie_name'];
        $cookie = new Cookie($cookieName);
        if ($cookie->isCookieFound()) {
            return $cookie->get('language');
        }
        return null;
    }
810599
public function getLanguage() {
        if (!session_id()) {
            if ($this->sessionManager) {
                $this->sessionManager->start();
            }
        }
		if (!isset($_SESSION['_fine_I18n_language'])){
			$this->setLanguage('default');
		}
		return $_SESSION['_fine_I18n_language'];
	}
585376
public function getLangClient() {
        if (!array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER) || !$_SERVER['HTTP_ACCEPT_LANGUAGE']) {
            return Config::config()['user']['output']['lang'];
        }
        else {
            $langcode = (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '';
            $langcode = (!empty($langcode)) ? explode(";", $langcode) : $langcode;
            $langcode = (!empty($langcode['0'])) ? explode(",", $langcode['0']) : $langcode;
            $langcode = (!empty($langcode['0'])) ? explode("-", $langcode['0']) : $langcode;

            return $langcode['0'];
        }
    }
296795
public static function lang()
    {
        if (!\Mmi\App\FrontController::getInstance()->getRequest()->lang) {
            return new self;
        }
        return (new self)
                ->whereLang()->equals(\Mmi\App\FrontController::getInstance()->getRequest()->lang)
                ->orFieldLang()->equals(null)
                ->orderDescLang();
    }
1174185
protected function getPrimaryLocale() {
		$primaryLanguage = Configure::read('Config.defaultLanguage');
		if (Configure::read('Config.defaultLocale')) {
			return Configure::read('Config.defaultLocale');
		}

		$primaryLocale = Configure::read('Config.allowedLanguages.' . $primaryLanguage . '.locale');
		return $primaryLocale;
	}
643501
public static function setApplicationLanguage()
    {
        $app = Yii::app();

        // If someone has hard-coded the app-language, return it instead
        if ($app->language != 'en_US')
            return $app->language;

        // If the language is set via POST, accept it
        if (php_sapi_name()  == 'cli')
            return $app->language;

        if (Cii::get($_POST, '_lang', false))
            $app->language = $_POST['_lang'];
        else if (isset($app->session['_lang']) && $app->session['_lang'] != NULL)
            $app->language = $app->session['_lang'];
        else
            $app->language = Yii::app()->getRequest()->getPreferredLanguage();


        Yii::app()->language = $app->session['_lang'] = $app->language;
        return $app->language;
    }
496399
public function t()
  {
      $args = func_get_args();
      $locales = count($this->supportedLocales);

      if (empty($args)) {
          return '';
      }

      if ($locales == 0) {
          return '';
      }

      if ($locales != count($args)) {
          $args = array_slice($args, 0, $locales);
      }

      if ($locales - count($args) > 0) {
          $args = array_merge($args, array_fill(0, $locales - count($args), ''));
      }

      $translations = array_combine($this->supportedLocales, $args);

      return $translations[$this->currentLocale];
  }