API15

JPlugin/loadLanguage

From Joomla! Documentation

< API15:JPlugin
Revision as of 13:41, 12 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

The "API15" 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]

Loads the plugin language file

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

loadLanguage($extension= '', $basePath=JPATH_BASE)
Parameter Name Default Value Description
$extension $extension The extension for which a language file should be loaded
$basePath JPATH_BASE $basePath The basepath to use

Returns[edit]

boolean True, if the file has successfully loaded.

Defined in[edit]

libraries/joomla/plugin/plugin.php

Importing[edit]

jimport( 'joomla.plugin.plugin' );

Source Body[edit]

function loadLanguage($extension = '', $basePath = JPATH_BASE)
{
        if(empty($extension)) {
                $extension = 'plg_'.$this->_type.'_'.$this->_name;
        }

        $lang =& JFactory::getLanguage();
        return $lang->load( strtolower($extension), $basePath);
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />