Add translation

@param   string      $path       Translation base path (up to, but without locale dir)
@param   string      $file       Translation file name (without .php extension)
@return  bool
@access	public
@author	a.schmidt@internet-of-voice.de
197452
public function addTranslation($path, $file) {
        $filename = $path . '/' . $this->locale . '/' . $file . '.php';
        if(!is_readable($filename)) {
            return false;
        } else {
            /** @noinspection PhpIncludeInspection */
            $add_messages = require($filename);
            $this->messages = array_merge($this->messages, $add_messages);
            return true;
        }
    }
1134943
protected function _setExportDir($path = null) {
		$path = (string)$path;
		if (file_exists($path)) {
			$this->_pathExportDir = $path;
		}
	}
697891
public static function load($path = __DIR__, $file = ".env")
    {
        $content = File::readLines($path . "/" . $file);
        $dotenv = static::parse($content);
        return static::apply($dotenv);
    }
1260242
public void addFileTranslation(String translation) {

        m_fileTranslations.add(translation);
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_VFS_ADD_FILE_TRANSLATION_1, translation));
        }
    }
1090182
public static function addPath($path)
    {
        if ( ! isset(self::$_messagePaths[$path]))
        {
            self::$_messagePaths[$path] = $path;
        }
    }
498272
public static function addPath($path)
    {
        if ( ! isset(self::$_i18nPaths[$path]))
        {
            self::$_i18nPaths[$path] = $path;
        }
    }
344496
public function addDomain($domain, $path='./locale/')
    {
        bindtextdomain($domain, $path);
        if ($this->_encoding) {
            bind_textdomain_codeset($domain, $this->_encoding);
        }
        $this->useDomain($domain);
    }
372359
public static function extension($file = false) {

        if ($file && self::isFile($file)) {

            return pathinfo($file, PATHINFO_EXTENSION);
        }

        return false;
    }
1374348
public static function addExtension(string $file, string $extension)
    {
        if (substr($file, strlen($extension) * -1) !== $extension) {
            $file .= $extension;
        }
        return $file;
    }
670541
public function addFile(string $file, string $locale = null): self
	{
		$collection = $this->getCollection($this->getType($file), $locale);
		if ($this->isRemoteFile($file)) {
			$collection->addRemoteFile($file);
		} else {
			$collection->addFile($file);
		}
		return $this;
	}
590718
public function add_path(string $path)
    {
        $path = \trailingslashit($path);
        $this->paths[] = $path;
        $this->parse_files($path);
    }
670826
public function createThumb($file,$path){
        $ext = $file->getExtension();
        $search = $this->config["images"]["images_ext"];
        if(array_search($ext, $search) !== false){
            $fullpath = $this->getFullPath().$path;
            $fullpaththumb = $this->getFullPath().'/'.$this->config['folder_thumb'].$path;
            $filename = $file->getFilename();
            $filename_new_first = '';
            $i=0;
            foreach ($this->config['images']['resize'] as $key => $value) {
                $i++;
                $image_info = $this->imageSizeName($path,$filename,$value);
                if(file_exists($fullpaththumb.$image_info['name']) === false){
                    $this->resizeImage($fullpath.$filename,$fullpaththumb.$image_info['name'],$image_info,$value);
                }
                if($i==1) $filename_new_first = $image_info['name'];
            }
            return $filename_new_first;
        }else{
            if( $this->config['debug'] ) $this->_log(__METHOD__." - $ext");
        }
    }
1233770
public function load($path, $file)
  {
    $the_file = $path . '/' . $file;

    return json_decode($this->read_file($the_file), true);
  }
612577
public function putFile($path, $file, $options = [])
    {
        return $this->putFileAs($path, $file, $file->hashName(), $options);
    }
1037727
public void addFolderTranslation(String translation) {

        m_folderTranslations.add(translation);
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_VFS_ADD_FOLDER_TRANSLATION_1, translation));
        }
    }
792222
public static function addFile($file, $type = '')
    {
        
		if(empty($type)){
			if(preg_match("/\.".tao_helpers_Scriptloader::CSS."$/", $file)){
				$type = tao_helpers_Scriptloader::CSS;
			}
			if(preg_match("/\.".tao_helpers_Scriptloader::JS."$/", $file)){
				$type = tao_helpers_Scriptloader::JS;
			}
		}
		switch(strtolower($type)){
			case tao_helpers_Scriptloader::CSS: self::$cssFiles[] = $file; break;
			case tao_helpers_Scriptloader::JS:  self::$jsFiles[]  = $file; break;
			default:
				throw new Exception("Unknown script type for file : ".$file);
		} 
        
    }
569321
public function uploadFileFromFilesystem(File $file, string $path)
    {
        $dir = sys_get_temp_dir();

        $filename = $dir.'/'.Uuid::uuid4()->toString().'.'.$this->guessExtension($path);

        rename($path, $filename);

        $file->path = $filename;
        $file->save();

        $file->addMedia($file->path)->toMediaCollection('default');

        $result = new Result();
        $result->setResources(Collection::make([$file]));

        return $result;
    }