src/Tasks/Build/Language.php
public function copyLanguage($dir, $target)
	{
		// Equals administrator/language or language
		$path  = $this->getSourceFolder() . "/" . $dir;
		$files = array();

		$hdl = opendir($path);

		while ($entry = readdir($hdl))
		{
			$p = $path . "/" . $entry;

			// Which languages do we have
			// Ignore hidden files
			if (substr($entry, 0, 1) != '.')
			{
				// Language folders
				if (!is_file($p))
				{
					// Make folder at destination
					$this->_mkdir($target . "/" . $dir . "/" . $entry);

					$fileHdl = opendir($p);

					while ($file = readdir($fileHdl))
					{
						// Only copy language files for this extension (and sys files..)
						if (substr($file, 0, 1) != '.' && strpos($file, $this->ext . "."))
						{
							$files[] = array($entry => $file);

							// Copy file
							$this->_copy($p . "/" . $file, $target . "/" . $dir . "/" . $entry . "/" . $file);
						}
					}

					closedir($fileHdl);
				}
			}
		}

		closedir($hdl);

		return $files;
	}
public function copyLanguage($dir, $target)
	{
		// Equals administrator/language or language
		$path  = $this->getSourceFolder() . "/" . $dir;
		$files = array();

		$hdl = opendir($path);

		while ($entry = readdir($hdl))
		{
			$p = $path . "/" . $entry;

			// Which languages do we have
			// Ignore hidden files
			if (substr($entry, 0, 1) != '.')
			{
				// Language folders
				if (!is_file($p))
				{
					// Make folder at destination
					$this->_mkdir($target . "/" . $dir . "/" . $entry);

					$fileHdl = opendir($p);

					while ($file = readdir($fileHdl))
					{
						// Only copy language files for this extension (and sys files..)
						if (substr($file, 0, 1) != '.' && strpos($file, $this->ext . "."))
						{
							$files[] = array($entry => $file);

							// Copy file
							$this->_copy($p . "/" . $file, $target . "/" . $dir . "/" . $entry . "/" . $file);
						}
					}

					closedir($fileHdl);
				}
			}
		}

		closedir($hdl);

		return $files;
	}
public function copyLanguage ( $ dir , $ target ) { // Equals administrator/language or language $ path = $ this -> getSourceFolder ( ) . "/" . $ dir ; $ files = array ( ) ; $ hdl = opendir ( $ path ) ; while ( $ entry = readdir ( $ hdl ) ) { $ p = $ path . "/" . $ entry ; // Which languages do we have // Ignore hidden files if ( substr ( $ entry , 0 , 1 ) != '.' ) { // Language folders if ( ! is_file ( $ p ) ) { // Make folder at destination $ this -> _mkdir ( $ target . "/" . $ dir . "/" . $ entry ) ; $ fileHdl = opendir ( $ p ) ; while ( $ file = readdir ( $ fileHdl ) ) { // Only copy language files for this extension (and sys files..) if ( substr ( $ file , 0 , 1 ) != '.' && strpos ( $ file , $ this -> ext . "." ) ) { $ files [ ] = array ( $ entry => $ file ) ; // Copy file $ this -> _copy ( $ p . "/" . $ file , $ target . "/" . $ dir . "/" . $ entry . "/" . $ file ) ; } } closedir ( $ fileHdl ) ; } } } closedir ( $ hdl ) ; return $ files ; }
Copy language files

@param   string $dir    The directory (administrator/language or language or mod_xy/language etc)
@param   String $target The target directory

@return   array

@since   1.0
Copy language files