• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help on struts I18N

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Foreman
Posts: 275
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic