[html-formfu] Internationalisation

Matthias Dietrich perl at rainboxx.de
Wed Oct 14 22:31:31 GMT 2009


Hi Octavian,

Am 14.10.2009 um 16:56 schrieb Octavian Râşniţă:

> Please tell me where can I read about how to localize the  
> HTML::FormFu forms if I use Catalyst::Plugin::I18N::DBI module for  
> localisation (or at least with Catalyst::Plugin::I18N).
>
> I would like to know how to make HTML::FormFu use the translations  
> offered by the Catalyst plugin.

as you are using Catalyst, I post my Catalyst config for FormFu here:

     'Controller::HTML::FormFu' => {
         constructor => {
             languages      => ['de'],
             localize_class => 'Catalyst::Plugin::I18N::DBI',
         },
         localize_from_context => 1,
     },

Specify the languages you want to use in the languages array (they are  
doubled then, one for I18N::DBI and one for  
Controller::HTML::FormFu).  FormFu doesn't decide which language to  
use, this is solely up to Catalyst::Plugin::I18N::DBI (or whatever  
I18N plugin you use).

It *should* also be possible to set languages_from_context for  
Controller::HTML::FormFu instead of passing languages to the  
constructor, but this didn't work for me when I tried, and because I  
was in time trouble I decided to use the above config.

Regards,
   Matthias

-- 
rainboxx Software Engineering
Matthias Dietrich, Freelancer

rainboxx                  |  Mobil: +49 (0) 151 / 50 60 78 64
Tölzer Str. 19            |  Tel.:  +49 (0) 711 / 12 89 09 80
70372 Stuttgart           |  WWW :  http://www.rainboxx.de

XING: https://www.xing.com/profile/Matthias_Dietrich18
GULP: http://www.gulp.de/profil/rainboxx.html





-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: Signierter Teil der Nachricht
Url : http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20091015/f0ce2c74/PGP.pgp


More information about the HTML-FormFu mailing list