struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Barefoot" <Joe.Baref...@motiva.com>
Subject RE: Internationalisation and Database/EJB data
Date Tue, 17 Dec 2002 21:16:56 GMT
Your database schema will largely depend on the amount/type of data that you need to internationalize...are
you internationalizing entire documents, paragraphs of text, just messages, all three?  Do
you need localized images too?

Once you settle on a database schema, you can write a custom MessageResources implementation
to fetch your messages.  Your impl will be used by Struts for the <bean:write> tag and
any other Struts classes/tags which fetch localized content.  The MessageResources implementation
factory is specified by an ActionServlet init parameter:
<init-param>
            <param-name>factory</param-name>
           <param-value>com.mycompany.strutsstuff.myubercoolresourcesfactory</param-value>
</init-param>

You can easily extend the MessageResources if you wish, and write other custom tags to retrieve,
say, XML-based localized documents, if need be.  If you search the archive( http://www.mail-archive.com/struts-user%40jakarta.apache.org/
), you should find plenty of posts on the topic, and I believe someone has written a "standard"
DB-based implementation of MessageResources to replace the file-based one.


hope this helps,
Joe

> -----Original Message-----
> From: David Graham [mailto:dgraham1980@hotmail.com]
> Sent: Tuesday, December 17, 2002 12:02 PM
> To: struts-user@jakarta.apache.org
> Subject: Re: Internationalisation and Database/EJB data
> 
> 
> You need to design multiple language ability into your 
> database schema.  I 
> would create a view to make the queries easier.
> 
> David
> 
> 
> 
> 
> 
> 
> >From: "Jordan Thomas" <jot@ipa.fraunhofer.de>
> >Reply-To: "Struts Users Mailing List" 
> <struts-user@jakarta.apache.org>
> >To: "Struts-User" <struts-user@jakarta.apache.org>
> >Subject: Internationalisation and Database/EJB data
> >Date: Tue, 17 Dec 2002 20:50:18 +0100
> >
> >Hi,
> >
> >What is the best way to make the data in my Database tables/EJB's
> >internationalised? Is there a standard pattern for having seamlessly
> >internationalised data in a database that I can use with struts?
> >Essentially, based on the user's locale I want different 
> data displayed and
> >unfortunately, resource files won't suffice.
> >
> >thanks
> >
> >Jordan
> >
> >
> >--
> >To unsubscribe, e-mail:   
> ><mailto:struts-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: 
> ><mailto:struts-user-help@jakarta.apache.org>
> 
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
> http://join.msn.com/?page=features/featuredemail
> 
> 
> --
> 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