english/libraries/joomla/installer/adapters/language.php
/**
	 * Custom install method
	 * Note: This behaves badly due to hacks made in the middle of 1.5.x to add
	 * the ability to install multiple distinct packs in one install. The
	 * preferred method is to use a package to install multiple language packs.
	 *
	 * @return  boolean  True on success
	 * @since   11.1
	 */
Custom install method
Note: This behaves badly due to hacks made in the middle of 1.5.x to add
the ability to install multiple distinct packs in one install. The
preferred method is to use a package to install multiple language packs.

@return  boolean  True on success
@since   11.1
Custom install method Note : This behaves badly due to hacks made in the middle of 1 . 5 . x to add the ability to install multiple distinct packs in one install . The preferred method is to use a package to install multiple language packs . @return boolean True on success @since 11 . 1
public function install()
	{
		$source = $this->parent->getPath('source');
		if (!$source) {
			$this->parent->setPath('source', ($this->parent->extension->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE) . '/language/'.$this->parent->extension->element);
		}
		$this->manifest = $this->parent->getManifest();
		$root = $this->manifest->document;
		if ((string)$this->manifest->attributes()->client == 'both')
		{
			JError::raiseWarning(42, JText::_('JLIB_INSTALLER_ERROR_DEPRECATED_FORMAT'));
			$element = $this->manifest->site->files;
			if (!$this->_install('site', JPATH_SITE, 0, $element)) {
				return false;
			}
			$element = $this->manifest->administration->files;
			if (!$this->_install('administrator', JPATH_ADMINISTRATOR, 1, $element)) {
				return false;
			}
			return true;
		}
		elseif ($cname = (string)$this->manifest->attributes()->client)
		{
			jimport('joomla.application.helper');
			$client = JApplicationHelper::getClientInfo($cname, true);
			if ($client === null) {
				$this->parent->abort(JText::sprintf('JLIB_INSTALLER_ABORT', JText::sprintf('JLIB_INSTALLER_ERROR_UNKNOWN_CLIENT_TYPE', $cname)));
				return false;
			}
			$basePath = $client->path;
			$clientId = $client->id;
			$element = $this->manifest->files;
			return $this->_install($cname, $basePath, $clientId, $element);
		}
		else
		{
			$cname = 'site';
			$basePath = JPATH_SITE;
			$clientId = 0;
			$element = $this->manifest->files;
			return $this->_install($cname, $basePath, $clientId, $element);
		}
	}
public function install ( ) { $ source = $ this -> parent -> getPath ( 'source' ) ; if ( ! $ source ) { $ this -> parent -> setPath ( 'source' , ( $ this -> parent -> extension -> client_id ? JPATH_ADMINISTRATOR : JPATH_SITE ) . '/language/' . $ this -> parent -> extension -> element ) ; } $ this -> manifest = $ this -> parent -> getManifest ( ) ; $ root = $ this -> manifest -> document ; if ( ( string ) $ this -> manifest -> attributes ( ) -> client == 'both' ) { JError :: raiseWarning ( 42 , JText :: _ ( 'JLIB_INSTALLER_ERROR_DEPRECATED_FORMAT' ) ) ; $ element = $ this -> manifest -> site -> files ; if ( ! $ this -> _install ( 'site' , JPATH_SITE , 0 , $ element ) ) { return false ; } $ element = $ this -> manifest -> administration -> files ; if ( ! $ this -> _install ( 'administrator' , JPATH_ADMINISTRATOR , 1 , $ element ) ) { return false ; } return true ; } elseif ( $ cname = ( string ) $ this -> manifest -> attributes ( ) -> client ) { jimport ( 'joomla.application.helper' ) ; $ client = JApplicationHelper :: getClientInfo ( $ cname , true ) ; if ( $ client === null ) { $ this -> parent -> abort ( JText :: sprintf ( 'JLIB_INSTALLER_ABORT' , JText :: sprintf ( 'JLIB_INSTALLER_ERROR_UNKNOWN_CLIENT_TYPE' , $ cname ) ) ) ; return false ; } $ basePath = $ client -> path ; $ clientId = $ client -> id ; $ element = $ this -> manifest -> files ; return $ this -> _install ( $ cname , $ basePath , $ clientId , $ element ) ; } else { $ cname = 'site' ; $ basePath = JPATH_SITE ; $ clientId = 0 ; $ element = $ this -> manifest -> files ; return $ this -> _install ( $ cname , $ basePath , $ clientId , $ element ) ; } }
Custom install method
 Note: This behaves badly due to hacks made in the middle of 1.5.x to add
 the ability to install multiple distinct packs in one install.
Custom install method Note : This behaves badly due to hacks made in the middle of 1 . 5 . x to add the ability to install multiple distinct packs in one install .
// Get the client application target // This causes an issue because we have two eid's, *sigh* nasty hacks! // Attempt to map the client to a base path // No client attribute was found so we assume the site as the client