Thank you for your answer Gabriel,
In the second option I have to add manually the line in the xml file,
right? I think it's not retrieved automatically (actually I could try
instead of ask, but I was trying to do some examples and now I don't
have anything on my laptop because I've deleted everything).

Thank you again,

Riccardo

On Feb 5, 11:50 am, Gabriel Petchesi <[email protected]> wrote:
> You can do it either in:
> 1. Action
>
> http://www.symfony-project.org/gentle-introduction/1_4/en/13-I18n-and...
> <http://www.symfony-project.org/gentle-introduction/1_4/en/13-I18n-and...>2.
> Template
>     echo __($sf_user->getFlash('error'))
>
> I think that the second option is recommended.
>
>     gabriel
>
> On Friday, February 4, 2011 3:55:14 PM UTC+2, ricvec wrote:
>
> > Hello everybody,
> > the subject of this topic is quite clear; I'd like to know how can I
> > localized the flash warnings/errors or some workaround to do it.
> > In my example I have this lines in the class actions.class.php for the
> > user model:
>
> > $q = Doctrine_Query::create()
> >     ->from('WeeventUser wu')
> >     ->where('wu.username = ?', $request->getParameter('username'))
> >     ->andWhere('wu.password = ?', $request->getParameter('password'));
>
> >   $weevent_users = $q->execute();
>
> >     if (count($weevent_users)==1)
> >       $this->redirect('user/show?id='.$weevent_users[0]->getId());
> >     else{
> >       $this->getUser()->setFlash('error', __('Username or password are
> > wrong'));
> >       $this->redirect('user/login');
> >     }
>
> > Thank you very much
>
> > Riccardo

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to