API16

JInstallerFile/loadLanguage

From Joomla! Documentation

< API16:JInstallerFile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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/file.php

Importing[edit]

jimport( 'joomla.installer.adapters.file' );

Source Body[edit]

public function loadLanguage($path)
{
        $this->manifest = &$this->parent->getManifest();
        $extension = strtolower(JFilterInput::getInstance()->clean((string)$this->manifest->name, 'cmd'));
        $lang =& JFactory::getLanguage();
        $source = $path;
                $lang->load($extension . '.manage', $source, null, false, false)
        ||      $lang->load($extension, $source, null, false, false)
        ||      $lang->load($extension . '.manage', JPATH_SITE, null, false, false)
        ||      $lang->load($extension , JPATH_SITE, null, false, false)
        ||      $lang->load($extension . '.manage', $source, $lang->getDefault(), false, false)
        ||      $lang->load($extension, $source, $lang->getDefault(), false, false)
        ||      $lang->load($extension . '.manage', JPATH_SITE, $lang->getDefault(), false, false)
        ||      $lang->load($extension , JPATH_SITE, $lang->getDefault(), false, false);
}


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

Examples[edit]

Code Examples[edit]