Another option is to pull your data already translated from a preconfigured Locale specific DB instance (an example is ORA_NLS configutation from Oracle)
doc available at
http://download-east.oracle.com/docs/cd/A81042_01/DOC/server.816/a76966/ch1.htm#41077
HTH,
M-
----- Original Message ----- From: "Garner, Shawn" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Sent: Thursday, December 08, 2005 12:46 PM
Subject: RE: Addressformat For Different Countries


He said he only needed it for 3 countries. Seems like my way would be easy
for that amount of pages.  He could even use tiles for the common parts of
the pages.
Seems like since the ordering is different that as tiles configuration would need a separate tiles definition for each country so there could possibly be
a 100 different tiles definitions.
I would be curious to see the tiles version.  I'm not that familiar with
tiles though.

Shawn

-----Original Message-----
From: Srinivas Jadcharla [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 08, 2005 11:14 AM
To: Struts Users Mailing List
Subject: Re: Addressformat For Different Countries

//I would set up three different JSP Pages ..

But what happens if there are about 100 countries?? we need 100 JSPs
right..Instead he can go for a single JSP with logic tags..but if there are
100 countries...his JSP will be very very long ..option left is to go for
tiles...


On 12/8/05, Garner, Shawn <[EMAIL PROTECTED]> wrote:

I would set up three different JSP Pages and route to them based on them
answering which country they are from.  I suggest you use the struts
method
to setLocale to the country and then make a version of the resources file
for that locale.

In our application we have two sets of properties files.
ApplicationResources_es.properties for Spanish
ApplicationResources.properties for English

If you do a setLocale in struts it will read the key from the appropriate
file.

so in the English properties file the key is:
title.welcome=Hello. How are you?

and in the Spanish properties file the key is:
title.welcome=Hola. ?Como esta usted?

Then in your JSP page all you need to do is do <bean:message
key="title.welcome"/>


There are other approaches but this will give you the best results.

Let me know if you have any more questions on the above.
Shawn


-----Original Message-----
From: Shiva Narayana [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 06, 2005 4:10 AM
To: Struts Users Mailing List
Subject: Addressformat For Different Countries

Hi All,

I have to implement address format depending on country in JSP. Like

For Australia                  Line1, line2 ,Street,Code
For UK                          Code,Street,Line1,COuntry
For India                        Street,City,line1,country

Likewise i have do display the label and text box based on the country.
Please help me how to do this in struts.

Thanks in advance.

--
Regards
Shiva



****************************************************************************
This email may contain confidential material.
If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.


****************************************************************************

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




--
Thanks & Regards

Srinivas
732-648-9421(Cell)

****************************************************************************
This email may contain confidential material.
If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.
****************************************************************************

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



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

Reply via email to