struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "K.Viswanathan" <kviswanat...@ggn.aithent.com>
Subject Re: i18n
Date Thu, 05 Sep 2002 05:15:08 GMT


I am asking about general programming. I'd like to know What are the
advantages of MessageResources/PropertyMessages of  struts.util over the
ResourceBundle ( and other related classes )of java.


Excerpts from Chuck Cavaness's book ( chapter 3) :
The Java library includes a set of classes to support reading message
resources from either a Java class or a properties file. The core class in
this set is the java.util.ResourceBundle. The Struts framework provides a
similar set of classes, based around the
org.apache.struts.util.MessageResources class that provides similar
functionality, but provides for a little more flexibility that the framework
requires.

The standard Java support for Internationalization has grown with the past
several releases and the Struts framework could probably use what's included
with 1.2 and newer, but since Struts was created before 1.2, they had to
build in their own support for several key pieces. .....

Chuck Cavaness's book  ( chapter  12)states that

 "The Struts framework does not use the ResourceBundle provided by the core
language. Instead, it provides similar functionality with the classes within
its framework. The org.apache.struts.util.MessageResources class and its
only concrete subclass, org.apache.struts.util.PropertyMessageResources, are
used to perform parallel functionality to that of the ResourceBundle
hierarchy. .."

Thanks
Vishy






----- Original Message -----
From: "Michael" <michael@idtect.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
Sent: Wednesday, September 04, 2002 6:14 PM
Subject: RE: i18n


> I'm not sure what you mean.  Are you talking about general programming
> or for HTML pages generated with a struts application?  For the latter,
> you do not need to use thoses classes, struts does it all for you.
>
> > -----Original Message-----
> > From: K.Viswanathan [mailto:kviswanathan@ggn.aithent.com]
> > Sent: Wednesday, September 04, 2002 1:56 PM
> > To: Struts Users Mailing List
> > Subject: Re: i18n
> >
> >
> >
> >
> > Yes. Tag libraries are useful but what I wanted to know is
> > what are the
> > advantages of using MessageResources,
> > PropertyMessageResources etc .
> > We can define simple .properties files for every locale and
> > use ResourceBundles to get the data inside the message tag.
> > Are there any advantage of using the classes mentioned above?
> >
> > Thanks
> > Vishy
> >
> > ----- Original Message -----
> > From: "Michael" <michael@idtect.com>
> > To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
> > Sent: Wednesday, September 04, 2002 4:59 PM
> > Subject: RE: i18n
> >
> >
> > > > I'd be happy if anyone could clarify my basic doubt
> > related to i18n
> > > > . I'd like to know what are the added features related to I18n
> > > > implemented in Struts over the one already supported by
> > java? what
> > > > are the advantages of
> > org.apache.struts.util.MessageResources  ( and
> > > > other related
> > > > classes) over ResourceBundle?
> > >
> > > With struts you can use the
> > >
> > > <bean:message key="base.title"/>
> > >
> > > To get the text out of a resource properties file.  Struts will use
> > > the locale defined in the user's browser preferences.
> > >
> > > Michael
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:struts-user-help@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-user-> unsubscribe@jakarta.apache.org>
> > For
> > additional commands,
> > e-mail: <mailto:struts-user-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message