src/Gelembjuk/Mail/EmailFormat.php
protected function getTemplateData($template) {
		// firstly, check for current locale, if it was set
		if ($this->locale != '') {
			$tdata = $this->getTemplateDataForLocale($template,$this->locale);
			
			// found for this locale. return
			if (is_array($tdata)) {
				return $tdata;
			}
		}
		
		// check for default locale
		// for example, didn't find for locale `ge` but found for default `en`
		if ($this->deflocale != '') {
			$tdata = $this->getTemplateDataForLocale($template,$this->deflocale);
			
			if (is_array($tdata)) {
				return $tdata;
			}
		}
		
		// if nothing found for both locales then check in root templates folder
		// this is normal case for non-internation application where 
		// locales are not used
		$tdata = $this->getTemplateDataForLocale($template,'');
			
		return $tdata;
	}
protected function getTemplateData($template) {
		// firstly, check for current locale, if it was set
		if ($this->locale != '') {
			$tdata = $this->getTemplateDataForLocale($template,$this->locale);
			
			// found for this locale. return
			if (is_array($tdata)) {
				return $tdata;
			}
		}
		
		// check for default locale
		// for example, didn't find for locale `ge` but found for default `en`
		if ($this->deflocale != '') {
			$tdata = $this->getTemplateDataForLocale($template,$this->deflocale);
			
			if (is_array($tdata)) {
				return $tdata;
			}
		}
		
		// if nothing found for both locales then check in root templates folder
		// this is normal case for non-internation application where 
		// locales are not used
		$tdata = $this->getTemplateDataForLocale($template,'');
			
		return $tdata;
	}
protected function getTemplateData ( $ template ) { // firstly, check for current locale, if it was set if ( $ this -> locale != '' ) { $ tdata = $ this -> getTemplateDataForLocale ( $ template , $ this -> locale ) ; // found for this locale. return if ( is_array ( $ tdata ) ) { return $ tdata ; } } // check for default locale // for example, didn't find for locale `ge` but found for default `en` if ( $ this -> deflocale != '' ) { $ tdata = $ this -> getTemplateDataForLocale ( $ template , $ this -> deflocale ) ; if ( is_array ( $ tdata ) ) { return $ tdata ; } } // if nothing found for both locales then check in root templates folder // this is normal case for non-internation application where  // locales are not used $ tdata = $ this -> getTemplateDataForLocale ( $ template , '' ) ; return $ tdata ; }
Returns template data according to locale settings

@param string $template Template file
Returns template data according to locale settings