JLanguage/getMetadata: Difference between revisions
From Joomla! Documentation
m removing red link to edit, no existant pages |
m clean up |
||
| Line 2: | Line 2: | ||
Returns a associative array holding the metadata | Returns a associative array holding the metadata | ||
<! removed transcluded page call, red link never existed > | <! removed transcluded page call, red link never existed > | ||
| Line 46: | Line 44: | ||
</source> | </source> | ||
<! removed transcluded page call, red link never existed > | <! removed transcluded page call, red link never existed > | ||
Revision as of 14:12, 24 March 2017
Description
Returns a associative array holding the metadata
<! removed transcluded page call, red link never existed >
Syntax
static getMetadata($lang)
| Parameter Name | Default Value | Description |
|---|---|---|
| $lang | The name of the language |
Returns
mixed If $lang exists return key/value pair with the language metadata, otherwise return NULL
Defined in
libraries/joomla/language/language.php
Importing
jimport( 'joomla.language.language' );
Source Body
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;
}
<! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />