<?php
class FormHelper
{
	public function errorsToString($form)
	{
		$errors = array();
    	if ($form->isErrors()) {
    				
    		$t = Zend_Registry::get('Zend_Translate');	
    		foreach ($form->getErrors() as $k => $v) {
    			if (count($v)) {
    				$help = array();
    				foreach ($v as $i) :
	               		$help[] = $t->translate($i);
	                endforeach;
	                       
	                $errors[$form->getElement($k)->getLabel()] = implode(',', $help);
    			}
    		}
    		
    	}
    	return $errors;
	}
	
}