aftershock has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have problem. There is a program which uses formfu and catalyst. This is what I have in an yml file...
elements: - type: Select name: w label_loc: Type of query * options: - [ '', 'Choose something' ] - [ 'Code1','String Theory' ] - [ 'Code2', 'Quantumchromodynamics' ]
How would you localize 'String Theory'? Would it be possible to use tool template on form fu (that it would be easier to localise that string? Then it could be...
elements: - type: Select name: w label_loc: Type of query * options: - [ '', 'Choose something' ] - [ 'Code1', '[% l('String Theory') %]' ] - [ 'Code2', '[% l('Quantumchromodynamics') %]' ]

Replies are listed 'Best First'.
Re: formfu, catalyst and tool template
by Anonymous Monk on Mar 23, 2011 at 11:51 UTC
    • You used <c></c> tags before, don't start using pre tags now , see Markup in the Monastery
    • write small programs to answer questions like this , say
      use YAML qw' Load '; use HTML::FormFu; my $f = HTML::FormFu->new; $f->populate( Load( <<'__YAML__' ) ); --- ... __YAML__ print $f;
    • use label_loc
      options: - value: 'Code1' label_loc: 'String Theory'
    • I feel HTML::FormFu needs to be slicker, somehow (don't ask me how ) :)