velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Florin Vancea" <fvan...@maxiq.ro>
Subject Re: Question on using text from resource bundles
Date Fri, 14 Jan 2005 06:23:10 GMT
It happens I was stumbling on the same issue at the time the thread was
started.
This is what I came up with for my purposes.
Maybe it helps.
(I would not mind one changing the package of the class if using it as-is. I
just attached my current copy).
Florin

----- Original Message ----- 
From: "Shinobu Kawai Yoshida" <shinobu.kawai@gmail.com>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Friday, January 14, 2005 3:01 AM
Subject: Re: Question on using text from resource bundles


> Hi Mike,
>
> > Or you could just write your own custom velocity tool (perhaps using the
> > struts one as a basis) if that's not a good fit.   A velocity tool is
just a
> > java class that's stuck into the Velocity context so you can call
methods on
> > it.
>
> ResourceBundles are one of the key features for java i18n.
>    http://java.sun.com/j2se/1.4.2/docs/guide/intl/intl.doc.html#23039
>
> I would say a ResourceBundleTool (or something like that) could come
> in handy as a generic tool.  And maybe a ViewTool which uses the
> request's Locale, too.  :)
>
> Best regards,
> -- Shinobu
>
> --
> Shinobu "Kawai" Yoshida <shinobu.kawai@gmail.com>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

Mime
View raw message