[html-formfu] Deflator/Inflator::FormatNumber

Carl Franks fireartist at gmail.com
Wed Dec 17 11:30:58 GMT 2008


2008/12/17  <onken at houseofdesign.de>:
>
> On Wed, 17 Dec 2008 11:01:35 +0000, "Carl Franks" <fireartist at gmail.com>
> wrote:
>> 2008/12/17  <onken at houseofdesign.de>:
>>>
>>> Hi Carl (and everyone else :-) ),
>>>
>>> I wrote a deflator/inflator couple for Number::Format.
>>> The locale can be specified as well as precision and trailing zeroes.
>>>
>>> I'd be glad if you would have a look at it and consider to add it to
>>> FormFu. The only disadvantage is that Number::Format fails on some
>>> systems.
>>> But I already contacted the author and send him a patch for the failing
>>> tests.
>>
>> It looks good.
>> Though, would it make sense to try and pull the locale from
>> $form->languages(), or at least provide a $form->locale() method you
>> can get it from, so it doesn't have to be set in multiple places?
>> Other than that, though - nice idea.
>
>
> $form->locale() would be great, we could tweak DateTime to use it as well.
> When I tested this module I recognized that the only locale I had installed
> was en_US. After installing locales-all I had all of them.
> Since $form->languages defaults to ['en'] I don't know if this is the best
> approach.

To be honest, I've never really used locale - so am not sure how it works.
But feel free to add $form->locale() - and patch DateTime too if
you've the inclination.
Do you have commit access?

Carl



More information about the HTML-FormFu mailing list