english/libraries/joomla/installer/adapters/template.php
/**
	 * Custom loadLanguage method
	 *
	 * @param   string  $path the path where to find language files
	 *
	 * @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) . '/templates/'.$this->parent->extension->element);
		}
		$clientId = isset($this->parent->extension) ? $this->parent->extension->client_id : 0;
		$this->manifest = $this->parent->getManifest();
		$name = strtolower(JFilterInput::getInstance()->clean((string)$this->manifest->name, 'cmd'));
		$client = (string)$this->manifest->attributes()->client;
		if (!$client) {
			$client = 'ADMINISTRATOR';
		}
		$extension = "tpl_$name";
		$lang = JFactory::getLanguage();
		$source = $path ? $path : ($this->parent->extension->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE) . '/templates/'.$name;
			$lang->load($extension . '.sys', $source, null, false, false)
		||	$lang->load($extension . '.sys', constant('JPATH_'.strtoupper($client)), null, false, false)
		||	$lang->load($extension . '.sys', $source, $lang->getDefault(), false, false)
		||	$lang->load($extension . '.sys', constant('JPATH_'.strtoupper($client)), $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 ) . '/templates/' . $ this -> parent -> extension -> element ) ; } $ clientId = isset ( $ this -> parent -> extension ) ? $ this -> parent -> extension -> client_id : 0 ; $ this -> manifest = $ this -> parent -> getManifest ( ) ; $ name = strtolower ( JFilterInput :: getInstance ( ) -> clean ( ( string ) $ this -> manifest -> name , 'cmd' ) ) ; $ client = ( string ) $ this -> manifest -> attributes ( ) -> client ; if ( ! $ client ) { $ client = 'ADMINISTRATOR' ; } $ extension = " tpl_ $ name " ; $ lang = JFactory :: getLanguage ( ) ; $ source = $ path ? $ path : ( $ this -> parent -> extension -> client_id ? JPATH_ADMINISTRATOR : JPATH_SITE ) . '/templates/' . $ name ; $ lang -> load ( $ extension . '.sys' , $ source , null , false , false ) || $ lang -> load ( $ extension . '.sys' , constant ( 'JPATH_' . strtoupper ( $ client ) ) , null , false , false ) || $ lang -> load ( $ extension . '.sys' , $ source , $ lang -> getDefault ( ) , false , false ) || $ lang -> load ( $ extension . '.sys' , constant ( 'JPATH_' . strtoupper ( $ client ) ) , $ 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
// Load administrator language if not set.