Пример #1
0
 /**
  * Returns the translation of a string
  *
  * @param string $subject
  * @param string $var_1
  * @param string $var2
  * @param string $var_n
  * @return string
  */
 public function translate($subject, $var_1 = '', $var2 = '', $var_n = '')
 {
     $args = func_get_args();
     $variables = array();
     if (1 < count($args)) {
         foreach ($args as $key => $value) {
             $variables['%' . $key] = $value;
         }
     }
     unset($variables['%0']);
     return $this->i18n->getTranslation($subject, $variables);
 }