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 Struts: Localition with 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 "Struts: Localition with "MessageResources Impls": Get only standard message resource " Watch "Struts: Localition with "MessageResources Impls": Get only standard message resource " New topic
Author

Struts: Localition with "MessageResources Impls": Get only standard message resource

Michael Decker
Greenhorn

Joined: Feb 19, 2003
Posts: 1
I'm using "MessageResources Impls" (http://sourceforge.net/project/showfiles.php?group_id=49385&package_id=76369) to get my message resources out of my database.... I've used this Instruction to install: http://wiki.apache.org/struts/StrutsMessageResourcesFromDatabase

But now, i get only the default messages... if I set with setLocale(Locale.GERMAN) (at Action-Class), it doesn't change anything... I've testet some cases... Default value of getLocale() is de_DE, if I delete the default message in my db, so I get an exeption, that struts misses message....

It's saved as:

I've generated debug output... Perhaps that could be tell anybody anything:



I don't understand my fault...

I thank you very Much!

Mike
la phon
Greenhorn

Joined: Apr 02, 2003
Posts: 5
you must store the locale in session.
you must do something like this:
request.getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY,new Locale("du") );

MessageResource will read from the session Locale..
 
Consider Paul's rocket mass heater.
 
subject: Struts: Localition with "MessageResources Impls": Get only standard message resource
 
Similar Threads
Webservices using hibernate, jboss and eclipse and MySQL
Unable to control logging levels in Struts2 using log4j.properties
HowTo Disable Logging Output for classes using commons.logging
Getting ApplicationResources from a Custome Request Processor
locales and jsf