english/libraries/joomla/installer/adapters/module.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) . '/modules/'.$this->parent->extension->element);
		}
		$this->manifest = $this->parent->getManifest();
		if ($this->manifest->files) {
			$element = $this->manifest->files;
			$extension = '';
			if (count($element->children())) {
				foreach ($element->children() as $file)
				{
					if ((string)$file->attributes()->module) {
						$extension = strtolower((string)$file->attributes()->module);
						break;
					}
				}
			}
			if ($extension) {
				$lang = JFactory::getLanguage();
				$source = $path ? $path : ($this->parent->extension->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE) . '/modules/'.$extension ;
				$folder = (string)$element->attributes()->folder;
				if ($folder && file_exists("$path/$folder")) {
					$source = "$path/$folder";
				}
				$client = (string)$this->manifest->attributes()->client;
				$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 ) . '/modules/' . $ this -> parent -> extension -> element ) ; } $ this -> manifest = $ this -> parent -> getManifest ( ) ; if ( $ this -> manifest -> files ) { $ element = $ this -> manifest -> files ; $ extension = '' ; if ( count ( $ element -> children ( ) ) ) { foreach ( $ element -> children ( ) as $ file ) { if ( ( string ) $ file -> attributes ( ) -> module ) { $ extension = strtolower ( ( string ) $ file -> attributes ( ) -> module ) ; break ; } } } if ( $ extension ) { $ lang = JFactory :: getLanguage ( ) ; $ source = $ path ? $ path : ( $ this -> parent -> extension -> client_id ? JPATH_ADMINISTRATOR : JPATH_SITE ) . '/modules/' . $ extension ; $ folder = ( string ) $ element -> attributes ( ) -> folder ; if ( $ folder && file_exists ( " $ path / $ folder " ) ) { $ source = " $ path / $ folder " ; } $ client = ( string ) $ this -> manifest -> attributes ( ) -> client ; $ 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