This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
Similar Threads
Best practice for i18n/locale selection?
How to convert date in one locale to another locale
Including html files outside the tomcat webapps directory
Beginning locales ...
Override request headers