english/libraries/joomla/language/language.php
/**
	 * Loads a single language file and appends the results to the existing strings
	 *
	 * @param   string   $extension  The extension for which a language file should be loaded.
	 * @param   string   $basePath   The basepath to use.
	 * @param   string   $lang       The language to load, default null for the current language.
	 * @param   boolean  $reload     Flag that will force a language to be reloaded if set to true.
	 * @param   boolean  $default    Flag that force the default language to be loaded if the current does not exist.
	 *
	 * @return  boolean  True if the file has successfully loaded.
	 *
	 * @since   11.1
	 */
Loads a single language file and appends the results to the existing strings
@param   string   $extension  The extension for which a language file should be loaded.
@param   string   $basePath   The basepath to use.
@param   string   $lang       The language to load, default null for the current language.
@param   boolean  $reload     Flag that will force a language to be reloaded if set to true.
@param   boolean  $default    Flag that force the default language to be loaded if the current does not exist.

@return  boolean  True if the file has successfully loaded.


Loads a single language file and appends the results to the existing strings @param string $extension The extension for which a language file should be loaded . @param string $basePath The basepath to use . @param string $lang The language to load default null for the current language . @param boolean $reload Flag that will force a language to be reloaded if set to true . @param boolean $default Flag that force the default language to be loaded if the current does not exist . @return boolean True if the file has successfully loaded .
public function load($extension = 'joomla', $basePath = JPATH_BASE, $lang = null, $reload = false, $default = true)
	{
		if (! $lang) {
			$lang = $this->lang;
		}
		$path = self::getLanguagePath($basePath, $lang);
		$internal = $extension == 'joomla' || $extension == '';
		$filename = $internal ? $lang : $lang . '.' . $extension;
		$filename = "$path/$filename.ini";
		$result = false;
		if (isset($this->paths[$extension][$filename]) && ! $reload) {
			$result = true;
		}
		else {
			$result = $this->loadLanguage($filename, $extension);
			if ($result === false && $default) {
				$oldFilename = $filename;
				$path		= self::getLanguagePath($basePath, $this->default);
				$filename = $internal ? $this->default : $this->default . '.' . $extension;
				$filename	= "$path/$filename.ini";
				if ($oldFilename != $filename) {
					$result = $this->loadLanguage($filename, $extension, false);
				}
			}
		}
		return $result;
	}
public function load ( $ extension = 'joomla' , $ basePath = JPATH_BASE , $ lang = null , $ reload = false , $ default = true ) { if ( ! $ lang ) { $ lang = $ this -> lang ; } $ path = self :: getLanguagePath ( $ basePath , $ lang ) ; $ internal = $ extension == 'joomla' || $ extension == '' ; $ filename = $ internal ? $ lang : $ lang . '.' . $ extension ; $ filename = " $ path / $ filename .ini " ; $ result = false ; if ( isset ( $ this -> paths [ $ extension ] [ $ filename ] ) && ! $ reload ) { $ result = true ; } else { $ result = $ this -> loadLanguage ( $ filename , $ extension ) ; if ( $ result === false && $ default ) { $ oldFilename = $ filename ; $ path = self :: getLanguagePath ( $ basePath , $ this -> default ) ; $ filename = $ internal ? $ this -> default : $ this -> default . '.' . $ extension ; $ filename = " $ path / $ filename .ini " ; if ( $ oldFilename != $ filename ) { $ result = $ this -> loadLanguage ( $ filename , $ extension , false ) ; } } } return $ result ; }
Loads a single language file and appends the results to the existing strings
 @param   string   $extension  The extension for which a language file should be loaded.
Loads a single language file and appends the results to the existing strings @param string $extension The extension for which a language file should be loaded .
// Strings for this file have already been loaded. // Load the language file // Check whether there was a problem with loading the file // No strings, so either file doesn't exist or the file is invalid // Check the standard file name // If the one we tried is different than the new name, try again