english/libraries/joomla/installer/adapters/component.php
/**
	 * Custom loadLanguage method
	 *
	 * @param   string  $path the path where to find language files
	 *
	 * @return  void
	 * @since   11.1
	 */
Custom loadLanguage method
@param   string  $path the path where to find language files


Custom loadLanguage method @param string $path the path where to find language files
public function loadLanguage($path=null)
	{
		$source = $this->parent->getPath('source');
		if (!$source) {
			$this->parent->setPath('source', ($this->parent->extension->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE).'/components/'.$this->parent->extension->element);
		}
		$this->manifest = $this->parent->getManifest();
		$name = strtolower(JFilterInput::getInstance()->clean((string)$this->manifest->name, 'cmd'));
		if (substr($name, 0, 4)=="com_") {
			$extension = $name;
		}
		else {
			$extension = "com_$name";
		}
		$lang	= JFactory::getLanguage();
		$source = $path ? $path : ($this->parent->extension->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE).'/components/'.$extension;
		if ($this->manifest->administration->files) {
			$element = $this->manifest->administration->files;
		}
		else if ($this->manifest->files) {
			$element = $this->manifest->files;
		}
		else {
			$element = null;
		}
		if ($element) {
			$folder = (string)$element->attributes()->folder;
			if ($folder && file_exists("$path/$folder")) {
				$source = "$path/$folder";
			}
		}
			$lang->load($extension.'.sys', $source, null, false, false)
		||	$lang->load($extension.'.sys', JPATH_ADMINISTRATOR, null, false, false)
		||	$lang->load($extension.'.sys', $source, $lang->getDefault(), false, false)
		||	$lang->load($extension.'.sys', JPATH_ADMINISTRATOR, $lang->getDefault(), false, false);
	}
public function loadLanguage ( $ path = null ) { $ source = $ this -> parent -> getPath ( 'source' ) ; if ( ! $ source ) { $ this -> parent -> setPath ( 'source' , ( $ this -> parent -> extension -> client_id ? JPATH_ADMINISTRATOR : JPATH_SITE ) . '/components/' . $ this -> parent -> extension -> element ) ; } $ this -> manifest = $ this -> parent -> getManifest ( ) ; $ name = strtolower ( JFilterInput :: getInstance ( ) -> clean ( ( string ) $ this -> manifest -> name , 'cmd' ) ) ; if ( substr ( $ name , 0 , 4 ) == " com_ " ) { $ extension = $ name ; } else { $ extension = " com_ $ name " ; } $ lang = JFactory :: getLanguage ( ) ; $ source = $ path ? $ path : ( $ this -> parent -> extension -> client_id ? JPATH_ADMINISTRATOR : JPATH_SITE ) . '/components/' . $ extension ; if ( $ this -> manifest -> administration -> files ) { $ element = $ this -> manifest -> administration -> files ; } else if ( $ this -> manifest -> files ) { $ element = $ this -> manifest -> files ; } else { $ element = null ; } if ( $ element ) { $ folder = ( string ) $ element -> attributes ( ) -> folder ; if ( $ folder && file_exists ( " $ path / $ folder " ) ) { $ source = " $ path / $ folder " ; } } $ lang -> load ( $ extension . '.sys' , $ source , null , false , false ) || $ lang -> load ( $ extension . '.sys' , JPATH_ADMINISTRATOR , null , false , false ) || $ lang -> load ( $ extension . '.sys' , $ source , $ lang -> getDefault ( ) , false , false ) || $ lang -> load ( $ extension . '.sys' , JPATH_ADMINISTRATOR , $ lang -> getDefault ( ) , false , false ) ; }
Custom loadLanguage method
 @param   string  $path the path where to find language files
Custom loadLanguage method @param string $path the path where to find language files