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

Hi, I use FormFu as a plugin in Catalyst. I ran into some problems.
How can I localize the title attribute in a form?

Suppose you have something like that in a yml file where a form is defined.

- type: Checkbox name: generate_invoice label_loc: generate invoice attributes: title: select this and you will generate invoice
I would like title to be translated into any language as label_loc is translated
if FormFu plugin is configured proplery.
title_loc is not the solution. Do you know a solution?

Replies are listed 'Best First'.
Re: About formFu as a plugin in Catalyst
by Anonymous Monk on Mar 03, 2011 at 17:43 UTC
    Whaaaaaaaat?!
      title_loc is not the solution. Do you know a solution?

      1. Patch HTML::FormFu::Attribute/HTML::FormFu::Element::_Group/... to allow for title_loc or attrs_loc or both
      2. Or use content_loc, it works right now
        - type: Block content_loc: name_of_the_loc_key
        where in a Locale::Maketext subclass, in %Lexicon,
        name_of_the_loc_key => q~<input name="generate_invoice" type="checkbo +x" value="1" title="select this and you will generate invoice" />,;
      I think FormFu definitely needs to adress this , and do a better job; you should submit a report.

      I also think tooltips(title) are sometimes erroneously used as a substitute for labels. Labels belong in a regular view, tooltips belong in a mini view.