*
The moose likes Struts and the fly likes how to set the locale for display tag 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 "how to set the locale for display tag" Watch "how to set the locale for display tag" New topic
Author

how to set the locale for display tag

vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 240
Hi ranchers,

In my jsp page, I am setting the locale from the database. It is working fine with other struts 2.0 tags and getting the locale specific message properties file. But display tag is not getting the property value for "titlekey".
Please tell me how to set the locale for display tag manually so that it will use displaytag.properties file according to the locale I have set for.

Now it is taking the browsers locale not the locale that I have set

Please help me as soon as possible


Regards, Vijay Jamadade.
( Nothing is Impossible.)
vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 240
Hey friends,

Finally I have found the solution. I downloaded the source file for i18jstladapter.java from the display tag library source download. The display tag properties file related configurations are specified in this file so it was taking by default the locale from the request. So I changed that methos to set the locale and added that file to my project. I also edited the path for that file in all my displaytag.properties file so that settings for my project will be taken from the file that i have configured.

There is one more way you can use


Thats what it was the thing remains is creating your own locale specific displaytga.properties file and add in your classpath
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to set the locale for display tag
 
Similar Threads
fmt:setBundle usage for internationalization
Accessing dynamic data in <f:view tag
how to get the display tag behave for the locale chage.
Unable to display images using fmt:messages with locale set in session
Beginning locales ...