english/libraries/joomla/language/language.php
/**
	 * Checks if a language exists.
	 *
	 * This is a simple, quick check for the directory that should contain language files for the given user.
	 *
	 * @param   string  $lang      Language to check.
	 * @param   string  $basePath  Optional path to check.
	 *
	 * @return  boolean  True if the language exists.
	 *
	 * @since   11.1
	 */
Checks if a language exists.
This is a simple, quick check for the directory that should contain language files for the given user.

@param   string  $lang      Language to check.
@param   string  $basePath  Optional path to check.

@return  boolean  True if the language exists.


Checks if a language exists . This is a simple quick check for the directory that should contain language files for the given user . @param string $lang Language to check . @param string $basePath Optional path to check . @return boolean True if the language exists .
public static function exists($lang, $basePath = JPATH_BASE)
	{
		static	$paths	= array();
		if (! $lang) {
			return false;
		}
		$path	= "$basePath/language/$lang";
		if (isset($paths[$path])) {
			return $paths[$path];
		}
		jimport('joomla.filesystem.folder');
		$paths[$path]	= JFolder::exists($path);
		return $paths[$path];
	}
public static function exists ( $ lang , $ basePath = JPATH_BASE ) { static $ paths = array ( ) ; if ( ! $ lang ) { return false ; } $ path = " $ basePath /language/ $ lang " ; if ( isset ( $ paths [ $ path ] ) ) { return $ paths [ $ path ] ; } jimport ( 'joomla.filesystem.folder' ) ; $ paths [ $ path ] = JFolder :: exists ( $ path ) ; return $ paths [ $ path ] ; }
Checks if a language exists.
Checks if a language exists .
// Return false if no language was specified // Return previous check results if it exists // Check if the language exists