protected function load($locale, $fileName)
	{
		// check for already loading
		if ($this->isFileLoaded($locale, $fileName) === true)
		{
			return true;
		}

		$startTime = microtime(true);

		$file = $this->getPath() . '/' . $locale . '/' . $fileName . '.php';
		if (file_exists($file) === false)
		{
			throw new FileNotFound($this->getPath(), $locale, $fileName);
		}

		$translationKeys = include $file;

		// not found
		if ($translationKeys === null || is_array($translationKeys) === false)
		{
			throw new InvalidTranslationFile($this->getPath(), $locale, $fileName);
		}

		// create array index locale
		if (array_key_exists($locale, $this->translations) === false)
		{
			$this->translations[$locale] = [];
		}

		// create array index file with the translations keys
		$this->translations[$locale][$fileName] = $translationKeys;

		// log da shit
		$this->log('Language loaded: ' . $locale . '/' . $fileName . ' (' . number_format(microtime(true) - $startTime, 2, ',', '.') . ')');

		return true;
	}
protected function load($locale, $fileName)
	{
		// check for already loading
		if ($this->isFileLoaded($locale, $fileName) === true)
		{
			return true;
		}

		$startTime = microtime(true);

		$file = $this->getPath() . '/' . $locale . '/' . $fileName . '.php';
		if (file_exists($file) === false)
		{
			throw new FileNotFound($this->getPath(), $locale, $fileName);
		}

		$translationKeys = include $file;

		// not found
		if ($translationKeys === null || is_array($translationKeys) === false)
		{
			throw new InvalidTranslationFile($this->getPath(), $locale, $fileName);
		}

		// create array index locale
		if (array_key_exists($locale, $this->translations) === false)
		{
			$this->translations[$locale] = [];
		}

		// create array index file with the translations keys
		$this->translations[$locale][$fileName] = $translationKeys;

		// log da shit
		$this->log('Language loaded: ' . $locale . '/' . $fileName . ' (' . number_format(microtime(true) - $startTime, 2, ',', '.') . ')');

		return true;
	}
protected function load ( $ locale , $ fileName ) { // check for already loading if ( $ this -> isFileLoaded ( $ locale , $ fileName ) === true ) { return true ; } $ startTime = microtime ( true ) ; $ file = $ this -> getPath ( ) . '/' . $ locale . '/' . $ fileName . '.php' ; if ( file_exists ( $ file ) === false ) { throw new FileNotFound ( $ this -> getPath ( ) , $ locale , $ fileName ) ; } $ translationKeys = include $ file ; // not found if ( $ translationKeys === null || is_array ( $ translationKeys ) === false ) { throw new InvalidTranslationFile ( $ this -> getPath ( ) , $ locale , $ fileName ) ; } // create array index locale if ( array_key_exists ( $ locale , $ this -> translations ) === false ) { $ this -> translations [ $ locale ] = [ ] ; } // create array index file with the translations keys $ this -> translations [ $ locale ] [ $ fileName ] = $ translationKeys ; // log da shit $ this -> log ( 'Language loaded: ' . $ locale . '/' . $ fileName . ' (' . number_format ( microtime ( true ) - $ startTime , 2 , ',' , '.' ) . ')' ) ; return true ; }
loads translations from file

@param string $locale
@param string $fileName
@throws FileNotFound
@throws InvalidTranslationFile
@return boolean
loads translations from file