This is needed because some applications aren't localized, and it's not
necessary because some websites are regional (not world wide). And because
of this, I must avoid Wicket from displaying messages in
English/Japanese/Chinese or whatever computer the user (let's say some
brazilian guy accessing my website from a Lan House in India) is using to
gain access.
Sure, I do that too for at least one app. However, I don't really see
the need to support that as an application setting, as providing a
custom session is not only easier, but if you provide a custom session
and override getLocale, the fixed locale session wouldn't work. So to
make that setting guaranteed, we should make getLocale on Session
final, which I would be absolutely against.
This is basically what you can do to fix a locale.
In you (Web)Application class
public ISessionFactory getSessionFactory() {
return new ISessionFactory() {
public Session newSession() {
return new WebSession(MyApplication.this) {
public Locale getLocale() {
return myFixedLocale();
}
};
}
};
}
Though you might consider backing down it bit on the annonymous
classes to keep things readable ;)
Eelco
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user