Hello Ralf,

> Would it be possible to use the constants in the translation files
> rather than the text messages? Instead of
> 
> "Invalid type given. String, integer or float expected" => "..."
> 
> use
> 
> Zend\I18n\Validator\Alnum::INVALID => "..."
> 
> So, when a text in the validator class is changed, then the translation
> will not automatically be broken again.

While this is probably a great idea in terms of maintainability, I'm not so 
sure about the mechanism that loads the translations. Will the translation 
files only be loaded when I use the specific validator? If not, using the 
constants will load all the validator classes, when the translation files are 
loaded, no?


Best regards,

Andreas
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to