english/libraries/joomla/language/language.php
/**
	 * Parses XML files for language information
	 *
	 * @param   string  $dir  Directory of files.
	 *
	 * @return  array  Array holding the found languages as filename => metadata array.
	 *
	 * @since   11.1
	 */
Parses XML files for language information
@param   string  $dir  Directory of files.

@return  array  Array holding the found languages as filename => metadata array.


Parses XML files for language information @param string $dir Directory of files . @return array Array holding the found languages as filename = > metadata array .
public static function parseXMLLanguageFiles($dir = null)
	{
		if ($dir == null) {
			return null;
		}
		$languages = array ();
		jimport('joomla.filesystem.folder');
		$files = JFolder::files($dir, '^([-_A-Za-z]*)\.xml$');
		foreach ($files as $file)
		{
			if ($content = file_get_contents("$dir/$file")) {
				if ($metadata = self::parseXMLLanguageFile("$dir/$file")) {
					$lang = str_replace('.xml', '', $file);
					$languages[$lang] = $metadata;
				}
			}
		}
		return $languages;
	}
public static function parseXMLLanguageFiles ( $ dir = null ) { if ( $ dir == null ) { return null ; } $ languages = array ( ) ; jimport ( 'joomla.filesystem.folder' ) ; $ files = JFolder :: files ( $ dir , '^([-_A-Za-z]*)\.xml$' ) ; foreach ( $ files as $ file ) { if ( $ content = file_get_contents ( " $ dir / $ file " ) ) { if ( $ metadata = self :: parseXMLLanguageFile ( " $ dir / $ file " ) ) { $ lang = str_replace ( '.xml' , '' , $ file ) ; $ languages [ $ lang ] = $ metadata ; } } } return $ languages ; }
Parses XML files for language information
 @param   string  $dir  Directory of files.
Parses XML files for language information @param string $dir Directory of files .