| Author |
help on struts I18N
|
sandeepamarnath sandeepamarnath
Greenhorn
Joined: Jul 30, 2008
Posts: 1
|
|
HI Im sandeep, Im using struts 1.1 I18N and i want to internationalize the dynamic data i.e. i want to print the data from the database in different languages. can any one help Thanks in advance
|
 |
Aniruddh Joshi
Ranch Hand
Joined: Jul 29, 2008
Posts: 275
|
|
hi, you can do this using multiple ApplicationResource files (Resource Bundles).You need the ISO codes for the languages , using them create your resource bundles with names ApplicationReaource_xx whre 'xx' is the ISO code for the language. The keys in all the files will be the same and the values will give you language specific messages. Then configure them in web.xml file as shown : <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>application</param-name> <param-value>ApplicationResources_xx</param-value> <param-value>ApplicationResources_xy</param-value> <param-value>ApplicationResources_xz</param-value> . . . </init-param> </servlet> I think above code will do the job. [ July 30, 2008: Message edited by: Aniruddh Joshi ]
|
Anrd
"One of the best things you could do is to simplify a larger application into a smaller one by reducing its process and complexity - Fowler"
|
 |
kademane guru
Greenhorn
Joined: Feb 20, 2007
Posts: 21
|
|
Originally posted by sandeepamarnath sandeepamarnath: HI Im sandeep, Im using struts 1.1 I18N and i want to internationalize the dynamic data i.e. i want to print the data from the database in different languages. can any one help Thanks in advance
Hi Sandeep, I am doing i18N using struts. In my project i want to display the static text which is there in JSP page in different language. please help me how to suceed in this?. And here how i should set the locale key for different language(i shouldn't set the locale in browser). Looking forward from you. Regards Gururaja.k
|
 |
Nyanas Kandhan
Ranch Hand
Joined: Jan 27, 2009
Posts: 35
|
|
You can use this method for displaying static data in different languages. For an example on Struts internationalization you can refer here.
Struts I18N using locale.
Struts Internationalization using browser settings.
regards
Struts Developer
|
regards,
Nyanaskandhan
|
 |
 |
|
|
subject: help on struts I18N
|
|
|