/**
* Returns an associative array holding the metadata.
*
* @param string $lang The name of the language.
*
* @return mixed If $lang exists return key/value pair with the language metadata, otherwise return NULL.
*
* @since 3.7.0
*/
public static function getMetadata($lang)
{
$file = self::getLanguagePath(JPATH_BASE, $lang) . '/langmetadata.xml';
if (!is_file($file)) {
$file = self::getLanguagePath(JPATH_BASE, $lang) . '/' . $lang . '.xml';
}
$result = null;
if (is_file($file)) {
$result = self::parseXMLLanguageFile($file);
}
if (empty($result)) {
return;
}
return $result;
}