Advertisement
Ra1ski

Untitled

Oct 17th, 2013
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1.     /**
  2.      * Возвращает русские варианты ошибок
  3.      * @param type $id
  4.      * @return type
  5.      */
  6.     public static function returnRussianErrors($messages) {
  7.         foreach($messages as $key=>$message)
  8.         {
  9.             $new_key = str_replace('_', ' ', $key);
  10.             $messages[$key] = str_replace($new_key, '"'.__('validation.'.$key).'"', $message);
  11.         }
  12.         return $messages;
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement