protected function getLanguage($singleLanguage, $metaModels)
    {
        if (!empty($singleLanguage)) {
            return array($singleLanguage);
        } elseif ($metaModels->isTranslated() && $metaModels->getAvailableLanguages()) {
            return $metaModels->getAvailableLanguages();
        }

        return array($GLOBALS['TL_LANGUAGE']);
    }
protected function getLanguage($singleLanguage, $metaModels)
    {
        if (!empty($singleLanguage)) {
            return array($singleLanguage);
        } elseif ($metaModels->isTranslated() && $metaModels->getAvailableLanguages()) {
            return $metaModels->getAvailableLanguages();
        }

        return array($GLOBALS['TL_LANGUAGE']);
    }
protected function getLanguage ( $ singleLanguage , $ metaModels ) { if ( ! empty ( $ singleLanguage ) ) { return array ( $ singleLanguage ) ; } elseif ( $ metaModels -> isTranslated ( ) && $ metaModels -> getAvailableLanguages ( ) ) { return $ metaModels -> getAvailableLanguages ( ) ; } return array ( $ GLOBALS [ 'TL_LANGUAGE' ] ) ; }
Get the language.

First check the overwrite language. Then check if the MetaModels is translated and get all languages from it.
Use the current language as fallback.

@param string     $singleLanguage The language with the overwrite.

@param IMetaModel $metaModels     The MetaModels for the check.

@return string[] A list with all languages or null.

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
Get the language .