source/Core/Language.php
public function validateLanguage($iLang = null)
    {
        // checking if this language is valid
        $aLanguages = $this->getLanguageArray(null, !$this->isAdmin());
        if (!isset($aLanguages[$iLang]) && is_array($aLanguages)) {
            $oLang = current($aLanguages);
            if (isset($oLang->id)) {
                $iLang = $oLang->id;
            }
        }

        return (int) $iLang;
    }
public function validateLanguage($iLang = null)
    {
        // checking if this language is valid
        $aLanguages = $this->getLanguageArray(null, !$this->isAdmin());
        if (!isset($aLanguages[$iLang]) && is_array($aLanguages)) {
            $oLang = current($aLanguages);
            if (isset($oLang->id)) {
                $iLang = $oLang->id;
            }
        }

        return (int) $iLang;
    }
public function validateLanguage ( $ iLang = null ) { // checking if this language is valid $ aLanguages = $ this -> getLanguageArray ( null , ! $ this -> isAdmin ( ) ) ; if ( ! isset ( $ aLanguages [ $ iLang ] ) && is_array ( $ aLanguages ) ) { $ oLang = current ( $ aLanguages ) ; if ( isset ( $ oLang -> id ) ) { $ iLang = $ oLang -> id ; } } return ( int ) $ iLang ; }
Validate language id. If not valid id, returns default value

@param int $iLang Language id

@return int
Validate language id . If not valid id returns default value