I haven't tried it yet, but Validator has support for
internationalization.  Also, you can take a look at the i18n support
in FormDef, which can help you in both formatting and parsing.  One of
the sample apps demonstrate this by allowing EN, DE, and IT formats in
its form (which has both dates and numbers).

Doing a google search on "struts i18n" showed me a couple of tutorials
on Struts i18n.  If you find a resource that you find helpful, do
share with the list, or better yet, mention it in the wiki
(http://wiki.apache.org/struts/).

Hubert

On 4/19/05, Daniel Lipofsky <[EMAIL PROTECTED]> wrote:
> I am wondering about best practices in struts for
> internationalization of dates and numbers.  Formatting
> is not too hard, but parsing and validation is trickier.
> We must simultaneously handle different formats for
> different users, so any validation or parsing has to
> take into account the user's locale.
> 
> Date formats include mm/dd/yyyy and dd/mm/yyyy.
> Number formats include 12,345.6 and 12.345,6
> (these are US and German respectively).
> 
> Also, for some things, like money, we want to enforce
> a fixed number of decimal places while other numbers
> should display however many decimal places they have.
> Some numbers are internal-use integers (always hidden)
> that should not be formatted.
> 
> Examples or tutorials would be very appreciated.
> 
> Thanks,
> Dan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to