JLanguage/getMetadata
From Joomla! Documentation
< API16:JLanguage
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Returns a associative array holding the metadata
Template:Description:JLanguage/getMetadata
Syntax[edit]
static getMetadata($lang)
Parameter Name | Default Value | Description |
---|---|---|
$lang | The name of the language |
Returns[edit]
mixed If $lang exists return key/value pair with the language metadata, otherwise return NULL
Defined in[edit]
libraries/joomla/language/language.php
Importing[edit]
jimport( 'joomla.language.language' );
Source Body[edit]
public static function getMetadata($lang)
{
$path = self::getLanguagePath(JPATH_BASE, $lang);
$file = $lang.'.xml';
$result = null;
if (is_file($path.DS.$file)) {
$result = self::_parseXMLLanguageFile($path.DS.$file);
}
return $result;
}
[Edit See Also] Template:SeeAlso:JLanguage/getMetadata
Examples[edit]
<CodeExamplesForm />