public function getLanguageUid(int $default = null): int {
    $languageUid = $default ?: 0;

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

    return $languageUid;
  }
public function getLanguageUid(int $default = null): int {
    $languageUid = $default ?: 0;

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

    return $languageUid;
  }
public function getLanguageUid ( int $ default = null ) : int { $ languageUid = $ default ? : 0 ; if ( TYPO3_MODE === 'FE' ) { if ( isset ( $ GLOBALS [ 'TSFE' ] -> sys_language_uid ) ) { $ languageUid = $ GLOBALS [ 'TSFE' ] -> sys_language_uid ; } } elseif ( is_object ( $ GLOBALS [ 'LANG' ] ) ) { if ( isset ( $ GLOBALS [ 'LANG' ] -> sys_language_uid ) ) { $ languageUid = $ GLOBALS [ 'LANG' ] -> sys_language_uid ; } } return $ languageUid ; }
Gets the current language UID.

@param int $default The default language UID, defaults to `0`
@return int The current language UID if available, otherwise the default one
Gets the current language UID .