Hello all,

I'm new to Tapestry and maybe I want to do something non-standard. I want to set locale using urls.

http://www.example.com/en/...../
http://www.example.com/fr/...../

I also write simple filter that do setting of locale, but I need to change something that strips language from URL so Tapestry can map to right page. After that I need to change LinkFactory to generate right links?

public boolean service(Request request, Response response, RequestHandler handler) throws IOException
       {
           String path = request.getPath();
           Pattern p = Pattern.compile("^/([a-z]{2})/.*");
           Matcher m = p.matcher(path);
           if (m.find()) {
this.localizationSetter.setThreadLocale(new Locale(m.group(1))); }
           // Here change request??
           return handler.service(request, response);
       }

I'm the first who is trying this or is it already implemented? As a newbie I do not know internals of Tapestry... mod_rewrite is the last I want to use...

Thank you
Tomas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to