public static function getLanguages($languages, $owner)
    {
        if (!$languages && isset(Yii::$app->params['languages'])) {
            $languages = Yii::$app->params['languages'];
        }

        if (!is_array($languages) || empty($languages)) {
            throw new InvalidConfigException('Please specify array of available languages in the '
            . get_class($owner) . ' or in the application parameters');
        }

        return $languages;
    }
public static function getLanguages($languages, $owner)
    {
        if (!$languages && isset(Yii::$app->params['languages'])) {
            $languages = Yii::$app->params['languages'];
        }

        if (!is_array($languages) || empty($languages)) {
            throw new InvalidConfigException('Please specify array of available languages in the '
            . get_class($owner) . ' or in the application parameters');
        }

        return $languages;
    }
public static function getLanguages ( $ languages , $ owner ) { if ( ! $ languages && isset ( Yii :: $ app -> params [ 'languages' ] ) ) { $ languages = Yii :: $ app -> params [ 'languages' ] ; } if ( ! is_array ( $ languages ) || empty ( $ languages ) ) { throw new InvalidConfigException ( 'Please specify array of available languages in the ' . get_class ( $ owner ) . ' or in the application parameters' ) ; } return $ languages ; }
Validates and returns list of languages.

@param array $languages
@param \yii\base\Object $owner
@return array
@throws InvalidConfigException
Validates and returns list of languages .