Hi Carl,

From: "Carl Franks" <fireart...@gmail.com>
2009/10/14 Octavian Râşniţă <orasn...@gmail.com>:
Hi,

I have seen that if I add in a form configuration file (Config::General
type):

languages fr

then French becomes the current language for localising the error messages.
But I don't know how to set that language dynamicly - from the program.

I have tried:

my $form = $c->stash->{form};
$form->languages(['fr']);

I have also tried to add $form->process; but nothing happends. The default
language still remains English.

Hi,
If you set this in your config, it should automatically pick up
Catalyst's current setting.

'Controller::HTML::FormFu':
 languages_from_context: 1

I've seen that it works by using
localize_from_context => 1,

and I also needed to add
constructor => {
localize_class => 'Catalyst::Plugin::I18N::DBI',
},

Thank you.

Octavian


_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to