Example #1
0
 /**
  * Translate a text
  *
  * @param   string  $sentence       The text that will be translated
  * @param   array   $placeholders   (optional) An array of placeholders
  * @param   string  $lang           (optional) Translation language
  *
  * @return  string  Translated text
  */
 public function t($sentence, $placeholders = array(), $lang = null)
 {
     return $this->app->t($sentence, $placeholders, $lang);
 }
Example #2
0
 /**
  * Push a validator
  * 
  * @param   array   $item
  * 
  * @return  $this
  */
 protected function push(array $item)
 {
     $item['error']['text'] = $this->app->t($item['error']['text']);
     return parent::push($item);
 }