API15:JPlugin/loadLanguage
From Joomla! Documentation
Description
Loads the plugin language file
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
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
boolean True, if the file has successfully loaded.
Defined in
libraries/joomla/plugin/plugin.php
Importing
jimport( 'joomla.plugin.plugin' );
Source Body
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
Code Examples