Re: How to call locale properties file based on urls

2013-02-12 Thread karthi
I am now using ThreadLocale service. Everythings works perfectly!! Now no need to worry for css files! Many thanks Lance Java & others for kind help. -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719968.html

Re: How to call locale properties file based on urls

2013-02-11 Thread karthi
Thank you -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719930.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To un

Re: How to call locale properties file based on urls

2013-02-11 Thread Lance Java
Ah, so you're using tapestry's built in localization support. How are you referencing your CSS file?. You should use the "context:" binding to access assets in src/main/webapp/. http://tapestry.apache.org/assets.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to

Re: How to call locale properties file based on urls

2013-02-11 Thread karthi
PersistantLocale & the url of the form www.club.mobi/de/Club -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-call-locale-properties-file-based-on-urls-tp5719862p5719928.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: How to call locale properties file based on urls

2013-02-11 Thread Lance Java
There's been multiple suggestions on solving this problem so it's best if you answer a few questions: 1. What approach have you taken? (RequestFilter, ComponentRequestFilter or ComponentEventLinkEncoder) 2. Are you setting the locale on the PersistantLocale or the ThreadLocale service 3. Are your U

Re: How to call locale properties file based on urls

2013-02-10 Thread karthi
Thanks for your replies.. I've done. I have kept multiple properties file under the app name for multiple languages & tml pages also. & My properties, tml pages loaded as per the language, However the css files are not loading? I've kept css in this structure: My deployment path is src/main/we

Re: How to call locale properties file based on urls

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 11:39:13 -0200, René Bernhardsgrütter wrote: Interfaces are very necessary!!!. They are crucial to tapestry to support lazy loading etc. You should NEVER refer to your services by their concrete type. This isn't just for Tapestry-IoC or Tapestry or even Java: these ar

Re: How to call locale properties file based on urls

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 10:17:57 -0200, René Bernhardsgrütter wrote: I also contributed the RequestFilter in different phases ("before:*", "before:SetupRender", "before:BeginRender") because, to me, this should set the locale before any template is rendered. SetupRender and BeginRender are comp

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
Hi Taha, decorating the ComponentEventLinkEncoder should have the same effect as contributing a ComponentRequestFilter. As I've mentioned in this thread, tapestry also supports locale specific assets (images, stylesheets etc) so I feel that a RequestFilter is the correct point of interception for t

Re: How to call locale properties file based on urls

2013-02-08 Thread Taha Siddiqi
Hi Is this something you are looking for http://tawus.wordpress.com/2013/01/07/changing-locale-based-on-domain/ regards Taha On Feb 8, 2013, at 7:09 PM, René Bernhardsgrütter wrote: >> I've never heard of filters named "SetupRender" or "BeginRender" so I'm >> pretty sure "before:SetupRender"

Re: How to call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
> I've never heard of filters named "SetupRender" or "BeginRender" so I'm > pretty sure "before:SetupRender" has no effect I just tried this while I was trying to get it work. > Interfaces are very necessary!!!. They are crucial to tapestry to support > lazy loading etc. You should NEVER refer to

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
René, I think I've figured out what your problem is. You should not be using LocalizationSetter as this is backed by the PersistantLocale which is ultimately responsible for including the language as the first folder in the URL. As I said initially, if you want your own custom logic (ie storing in

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
> I also contributed the RequestFilter in different phases ("before:*", "before:SetupRender", "before:BeginRender") because, to me, this should set the locale before any template is rendered. I've never heard of filters named "SetupRender" or "BeginRender" so I'm pretty sure "before:SetupRender" ha

Re: How to call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
I also contributed the RequestFilter in different phases ("before:*", "before:SetupRender", "before:BeginRender") because, to me, this should set the locale before any template is rendered. But it didn't work. I've tried now again and set the things you said before. By the way, thanks for the tips

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
René, tapestry also supports locale specific assets (eg images) so a ComponentRequestFilter is too late in the request-processing pipeline (http://tapestry.apache.org/request-processing.html). I think your main problem is that you have contributed your localeFilter "after:*" so it won't run until

Re: How to call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
Hi karthi and Lance Java, @karthi, if you try the second solution and it doesn't work as expected, try it with ComponentRequestFilter instead of RequestFilter. I had there a tricky problem this week, see here: https://mail-archives.apache.org/mod_mbox/tapestry-users/201302.mbox/%3c51123b7f.20...@g

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
All of the services I mentioned (PersistantLocale, ThreadLocale, Request and RequestHandler) are tapestry managed services. I suggest you familiarize yourself with tapestry IOC http://tapestry.apache.org/defining-tapestry-ioc-services.html http://tapestry.apache.org/tapestry-ioc-configuration.html

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
Tapestry's built in language support is as follows www.myserver.com/Clubs - persistant locale is null www.myserver.com/de/Clubs - persistant locale is "de" If you are happy enough with that then use the built in support. If not, use my second suggestion. -- View this message in context: http

Re: How to call locale properties file based on urls

2013-02-08 Thread karthi
One more question: You said: If you set the locale on the PersistentLocale service How to set PersistentLocale service? I just tried to inject in my page but it doesn't gives any effect rather it throws null pointer exception. -- View this message in context: http://tapestry.1045711.n5.nabbl

Re: How to call locale properties file based on urls

2013-02-08 Thread karthi
Thanks for your reply. the first folder in the URL will be the language? Here, Can't understand? could you elaborate? If my called url is de.club.mobi/club then will my club_de.properties invoke automatically? -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-cal

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
Tapestry has built in support for including the language in the URL. If you set the locale on the PersistentLocale service, the first folder in the URL will be the language http://tapestry.apache.org/localization.html There is also a ThreadLocale service which is ultimately used for message lookup