• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

help on struts I18N

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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 Hand
Posts: 275
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
It's never done THAT before. Explain it to me tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic