Showing posts with label Zend_Translate. Show all posts
Showing posts with label Zend_Translate. Show all posts

Zend_Translate and Error message

For example: You build a form with Zend_Form, the only one Email address text box is simple and used to determine Zend_Validate_EmailAddress Email is valid:



When you run the function, you attempt to enter an invalid email example: 123; á @ 12222, and of course it's an error, a heap of errors like this:



But if you want all the messages above a certain language (as Default), why? For example, you want to report in Vietnamese? You will have to use Zend_Translate by way or that. But certainly one thing that you would like to be a headache.

After some research, I found a way that I was very pleased, and in this article I want to share with you. Note that I do on Zend 1:10:



And I wrote in my file vi.csv following language



After running the function, the resulting error is as follows: