JInstallerTemplate/loadLanguage
From Joomla! Documentation
< API16:JInstallerTemplate
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]
Custom loadLanguage method
<! removed transcluded page call, red link never existed >
Syntax[edit]
loadLanguage($path)
Parameter Name | Default Value | Description |
---|---|---|
$path | $path the path where to find language files |
Defined in[edit]
libraries/joomla/installer/adapters/template.php
Importing[edit]
jimport( 'joomla.installer.adapters.template' );
Source Body[edit]
public function loadLanguage($path)
{
$this->manifest = &$this->parent->getManifest();
$name = strtolower(JFilterInput::getInstance()->clean((string)$this->manifest->name, 'cmd'));
$client = (string)$this->manifest->attributes()->client;
$extension = "tpl_$name";
$lang =& JFactory::getLanguage();
$source = $path;
$lang->load($extension . '.manage', $source, null, false, false)
|| $lang->load($extension, $source, null, false, false)
|| $lang->load($extension . '.manage', constant('JPATH_'.strtoupper($client)), null, false, false)
|| $lang->load($extension, constant('JPATH_'.strtoupper($client)), null, false, false)
|| $lang->load($extension . '.manage', $source, $lang->getDefault(), false, false)
|| $lang->load($extension, $source, $lang->getDefault(), false, false)
|| $lang->load($extension . '.manage', constant('JPATH_'.strtoupper($client)), $lang->getDefault(), false, false)
|| $lang->load($extension, constant('JPATH_'.strtoupper($client)), $lang->getDefault(), false, false);
}
<! removed transcluded page call, red link never existed >
Examples[edit]
Code Examples[edit]