File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Including localized static files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Including localized static files" Watch "Including localized static files" New topic

Including localized static files

Peter Laurinec
Ranch Hand

Joined: Sep 13, 2004
Posts: 52
Hi all.
Do any of you guys know the way, how can I include static text blocks (files) according to locale of the user accessing the page?

User with english locale enters, I want to include file 'intro_en.jsp'
User with slovak locale, include 'intro_sk.jsp'

Is there any way in struts how to achieve this ?

I really appreciate any responce you can give me. Thx

SCJP 1.5 (done, at last)<br /> <br />"If everything seems to be going well you have obviously overlooked something."
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Struts doesn't handle internationalization in quite this way. With struts, you define keys for text that is displayed on a jsp, and then have different properties files for each language you support. With Struts, though, you would normally have just one Jsp file.

Just go to Google and key in "Struts internationalization" and you'll see several good links on how to support multiple languages in Struts.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Including localized static files
It's not a secret anymore!