Thiago, Thank you. I am able to add locale to query parameter and retrieved. But I can’t use PersistentLocale as it is cookie-based. I made a mistake in my post. I am using Tapestry5.0.16 and don’t have those classes you mentioned. I implemented a localeRequestFitler (based an old post in this forum) and contribute it to both CompentEventRequestHandler and PageRenderRequestHandler. (There is no ComponentRequestHandler). It’s being called as expected and I use LocaleSetting.setLocale method to set the new locale. But it isn’t picked up by Tapestry while getMessage is called. As mentioned, there are no LinkCreationListener and LinkCreatinHub class in T5.0 either. Please advise.
Thanks, Simon From: Thiago H de Paula Figueiredo [via Tapestry] [mailto:ml-node+s1045711n5621191...@n5.nabble.com] Sent: Thursday, April 05, 2012 2:49 PM To: Simon Zeng Subject: Re: Switch Locale with cookie disabled On Thu, 05 Apr 2012 14:25:06 -0300, gs_tapestry <[hidden email]</user/SendEmail.jtp?type=node&node=5621191&i=0>> wrote: > Hi, Hi! > I am customizing an Tapestry 5.1 based application to make it SEO > compliant. We have a working switch locale function. We use > PersistentLocale in our > implementation. Since PersistentLocale is Cookie-based, it stops working > when we disable browser cookie ( a requirement for SEO). > My question is how to implement switching locale in Tapestry with cookie > disabled. Tapestry 5.2+ has the option of adding the locale to the URL automatically. In 5.1, you can implement a LinkCreationListener, contributed to the LinkCreatinHub service, that adds a query parameter with the locale and a ComponentRequestFilter, contributed to the ComponentRequestHandler, to get this query parameter and set the PersistentLocale accordingly. Or, instead of a LinkCreationListener, you could use URL rewriter so you can avoid query parameters. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email]</user/SendEmail.jtp?type=node&node=5621191&i=1> For additional commands, e-mail: [hidden email]</user/SendEmail.jtp?type=node&node=5621191&i=2> ________________________________ If you reply to this email, your message will be added to the discussion below: http://tapestry.1045711.n5.nabble.com/Switch-Locale-with-cookie-disabled-tp5620967p5621191.html To unsubscribe from Switch Locale with cookie disabled, click here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5620967&code=c2ltb256QGdhbGxlcnlzeXN0ZW1zLmNvbXw1NjIwOTY3fDQzNDc4OTY5MQ==>. NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> -- View this message in context: http://tapestry.1045711.n5.nabble.com/Switch-Locale-with-cookie-disabled-tp5620967p5621945.html Sent from the Tapestry - User mailing list archive at Nabble.com.