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

Struts Internationalization Issue

Sailesh Ganeshan

Joined: Sep 29, 2010
Posts: 13
Hi there,

I've an issue with struts internationalization. Let me give you a quick description of the problem:

I need to show a country specific content on my website, which happens to be for US. Hence, I've created a resource file ''. Similarly, I've to show a different content for other countries, which I'm managing in the resource file: ''.

However, the issue is the system always looks up the content from en_US file irrespective of my country. This could possibly be because, the default locale is en_US. Is there any way to force change this default locale, so that '' is preferred for countries other than US ?

I've however, corrected the issue, by passing request_locale as parameter in the URL. But, I'd prefer it to have this configurable, rather than URL driven!


Live your life. Don't just exist.
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

if you go through in struts-core jar file the default local configuration is

You can change the default configuration in two ways one way is override the value in or else add constant in struts.xml file

ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Sanjeev Kumar Ramineni

Joined: Jul 14, 2010
Posts: 12

Please refer to the link below. This might solve your problem.

I agree. Here's the link:
subject: Struts Internationalization Issue
jQuery in Action, 3rd edition