| Author |
Struts Internationalization Issue
|
Sailesh Ganeshan
Greenhorn
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 ' MyResource_en_US.properties'. Similarly, I've to show a different content for other countries, which I'm managing in the resource file: 'MyResources.properties'.
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 'MyResources.properties' 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!
Rgds,
Sailesh
|
Live your life. Don't just exist.
|
 |
Mohana Rao Sv
Ranch Hand
Joined: Aug 01, 2007
Posts: 485
|
|
if you go through default.properties 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 struts.properties 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
Greenhorn
Joined: Jul 14, 2010
Posts: 12
|
|
Hi,
Please refer to the link below. This might solve your problem.
http://www.vaannila.com/struts/struts-example/struts-i18n-example-1.html.
Regards,
Sanjeev.
|
 |
 |
|
|
subject: Struts Internationalization Issue
|
|
|