src/Mouf/Utils/I18n/Fine/Translate/FinePHPArrayTranslationService.php
public function loadAllMessages() {
		$files = glob(ROOT_PATH.$this->i18nMessagePath.'message*.php');

		$defaultFound = false;
		foreach ($files as $file) {
			$base = basename($file);
			if ($base == "message.php") {
				$messageFile = new FineMessageLanguage();
				$messageFile->loadAllFile(ROOT_PATH.$this->i18nMessagePath);
				$this->messages['default'] = $messageFile;
				$defaultFound = true;
			} else {
				if(strpos($base, '_custom') === false) {
					$phpPos = strpos($base, '.php');
					$language = substr($base, 8, $phpPos-8);
					$messageLanguage = new FineMessageLanguage();
					$messageLanguage->loadAllFile(ROOT_PATH.$this->i18nMessagePath, $language);
					$this->messages[$language] = $messageLanguage;
				}
			}
		}
		if (!$defaultFound) {
			$messageFile = new FineMessageLanguage();
			$messageFile->loadAllFile(ROOT_PATH.$this->i18nMessagePath);
			$this->messages['default'] = $messageFile;
		}
	}
public function loadAllMessages() {
		$files = glob(ROOT_PATH.$this->i18nMessagePath.'message*.php');

		$defaultFound = false;
		foreach ($files as $file) {
			$base = basename($file);
			if ($base == "message.php") {
				$messageFile = new FineMessageLanguage();
				$messageFile->loadAllFile(ROOT_PATH.$this->i18nMessagePath);
				$this->messages['default'] = $messageFile;
				$defaultFound = true;
			} else {
				if(strpos($base, '_custom') === false) {
					$phpPos = strpos($base, '.php');
					$language = substr($base, 8, $phpPos-8);
					$messageLanguage = new FineMessageLanguage();
					$messageLanguage->loadAllFile(ROOT_PATH.$this->i18nMessagePath, $language);
					$this->messages[$language] = $messageLanguage;
				}
			}
		}
		if (!$defaultFound) {
			$messageFile = new FineMessageLanguage();
			$messageFile->loadAllFile(ROOT_PATH.$this->i18nMessagePath);
			$this->messages['default'] = $messageFile;
		}
	}
public function loadAllMessages ( ) { $ files = glob ( ROOT_PATH . $ this -> i18nMessagePath . 'message*.php' ) ; $ defaultFound = false ; foreach ( $ files as $ file ) { $ base = basename ( $ file ) ; if ( $ base == "message.php" ) { $ messageFile = new FineMessageLanguage ( ) ; $ messageFile -> loadAllFile ( ROOT_PATH . $ this -> i18nMessagePath ) ; $ this -> messages [ 'default' ] = $ messageFile ; $ defaultFound = true ; } else { if ( strpos ( $ base , '_custom' ) === false ) { $ phpPos = strpos ( $ base , '.php' ) ; $ language = substr ( $ base , 8 , $ phpPos - 8 ) ; $ messageLanguage = new FineMessageLanguage ( ) ; $ messageLanguage -> loadAllFile ( ROOT_PATH . $ this -> i18nMessagePath , $ language ) ; $ this -> messages [ $ language ] = $ messageLanguage ; } } } if ( ! $ defaultFound ) { $ messageFile = new FineMessageLanguage ( ) ; $ messageFile -> loadAllFile ( ROOT_PATH . $ this -> i18nMessagePath ) ; $ this -> messages [ 'default' ] = $ messageFile ; } }
Load all messages
Load all messages