Hi all. I have this Validator:
<?php
/**
* Check if the email is used from another customer.
*
* If yes the returned error message contains a link to the lost
password action.
*
*/
class My_Validate_User_EmailUsed extends Zend_Validate_Abstract {
const EU_ERROR = 'euError';
protected $_messageTemplates = array (
self::EU_ERROR => ''
);
function __construct() {
$tr = Zend_Registry::get('Zend_Translate');
$this->_messageTemplates['euError'] =
sprintf($tr->_('email in use for other account. <a href="%1$s">Lost
Password ?</a>'), MY_URL . 'user/lost/password");
}
function isValid($value) {
if (!Skebby_Customer::isEmailAlreadyRegistered($value))
return true;
$this->_error(self::EU_ERROR);
return false;
}
}
where MY_URL can change from user to user.
Obiously, I have a .mo file that translate the message, but I can not
insert this error line (into .po file) because it contains "$". Does
someone can suggest me a solution ?
Tnx.
M.
--
Michel 'ZioBudda' Morelli [EMAIL PROTECTED]
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764
http://www.ziobuddalabs.it Skype: zio_budda
http://www.ajaxblog.it MSN: [EMAIL PROTECTED]
JABBER: [EMAIL PROTECTED]