public function translate($id, $params = null, $domain = null, $locale = null) {
		if ($domain === null) {
			$domain = $this->handleDomain($id);
		}
		
		if ($locale === null) {
			$locale = $this->getLocale();
		} else {
			$locale = $this->normalizeLocale($locale);
		}
		
		$translation = $this->getTranslation($id, $domain, $locale, $this->fallbackLocales);
		
		if ($translation === null) {
			return $this->handleFailure($id);
		}
		
		if (! empty($this->plugins)) {
			$translation = $this->handlePlugins($locale, $translation, $params);
		}
		
		if ($params === null) {
			return $translation;
		}
		
		return strtr($translation, $this->normalizeParams($params));
	}
public function translate($id, $params = null, $domain = null, $locale = null) {
		if ($domain === null) {
			$domain = $this->handleDomain($id);
		}
		
		if ($locale === null) {
			$locale = $this->getLocale();
		} else {
			$locale = $this->normalizeLocale($locale);
		}
		
		$translation = $this->getTranslation($id, $domain, $locale, $this->fallbackLocales);
		
		if ($translation === null) {
			return $this->handleFailure($id);
		}
		
		if (! empty($this->plugins)) {
			$translation = $this->handlePlugins($locale, $translation, $params);
		}
		
		if ($params === null) {
			return $translation;
		}
		
		return strtr($translation, $this->normalizeParams($params));
	}
public function translate ( $ id , $ params = null , $ domain = null , $ locale = null ) { if ( $ domain === null ) { $ domain = $ this -> handleDomain ( $ id ) ; } if ( $ locale === null ) { $ locale = $ this -> getLocale ( ) ; } else { $ locale = $ this -> normalizeLocale ( $ locale ) ; } $ translation = $ this -> getTranslation ( $ id , $ domain , $ locale , $ this -> fallbackLocales ) ; if ( $ translation === null ) { return $ this -> handleFailure ( $ id ) ; } if ( ! empty ( $ this -> plugins ) ) { $ translation = $ this -> handlePlugins ( $ locale , $ translation , $ params ) ; } if ( $ params === null ) { return $ translation ; } return strtr ( $ translation , $ this -> normalizeParams ( $ params ) ) ; }
Translate the ID or message

@param  string $id     Translation template ID
@param  array  $params Translation template parameters
@param  string $domain Domain of ID's
@param  string $locale Specify the locale
@return string
Translate the ID or message