Re: Localize WOLips project [SOLVED]
Re: Localize WOLips project [SOLVED]
- Subject: Re: Localize WOLips project [SOLVED]
- From: Rams <email@hidden>
- Date: Fri, 16 May 2008 15:52:15 -0400
Beautiful solution Guido! I cleaned it up a bit and it looks like:
public WOActionResults performActionNamed(String actionName) {
if(!context().hasSession()) {
ERXLocalizer localizer =
ERXLocalizer
.localizerForLanguages(context().request().browserLanguages());
ERXLocalizer.setCurrentLocalizer(localizer);
}
return super.performActionNamed(actionName);
}
Thank you all for your assistance!
On May 16, 2008, at 12:09 AM, Guido Neitzer wrote:
On 15.05.2008, at 17:34, Rams wrote:
I think I will look into direct actions and hiding the session in a
cookie perhaps :-)
Why? You can use a sessionless application easily with the correct
localizer!
Do something like this in your base "performActionNamed":
public WOActionResults performActionNamed(String actionName) {
ERXLocalizer localizer = null;
Session session = (Session) this.existingSession();
if (session != null) {
localizer = ERXLocalizer.currentLocalizer();
}
else {
localizer =
ERXLocalizer.localizerForLanguages(this.context().request().
browserLanguages());
ERXLocalizer.setCurrentLocalizer(localizer);
}
return super.performActionNamed(actionName);
}
Hope this works as I just typed it from memory. Try and it and see
what happens.
cug
--
http://www.event-s.net
--
Learn how to secure your email
(Mac OS X 10.3+) http://www.joar.com/certificates/
(Windows) http://www.marknoble.com/tutorial/smime/smime.aspx
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden