API16

JLanguage/getMetadata

From Joomla! Documentation

< API16:JLanguage
Revision as of 17:49, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Returns a associative array holding the metadata <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JLanguage/getMetadata|Edit Descrip...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

[Edit Descripton]

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 />