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:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 12:02 PM
> To: [EMAIL PROTECTED]
> 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" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" 
> <[EMAIL PROTECTED]>
> >To: "Struts-User" <[EMAIL PROTECTED]>
> >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:[EMAIL PROTECTED]>
> >For additional commands, e-mail: 
> ><mailto:[EMAIL PROTECTED]>
> 
> 
> _________________________________________________________________
> 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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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

Reply via email to