Re: Localization & URLs for Default Language

2019-09-06 Thread Rafael Bugajewski
Hello, I was comparing a Locale with a String, so please forget my previous message ;) Everything works as expected now. Thanks for this great idea that is much more lightweight than writing a link transformer. Best, Rafael > On 2019-06-09, at 01:21 PM, Rafael Bugajewski > wrote: > > Hello

Re: Localization & URLs for Default Language

2019-09-06 Thread Rafael Bugajewski
Hello Cezary, that’s actually a great idea. I tried to add a service advisor, but it doesn’t seem to do what I want: @Match("PersistentLocale") public static void adviseNullForDefaultLanguage(MethodAdviceReceiver receiver) { MethodAdvice advice = new MethodAdvice() { public void advi

Re: Localization & URLs for Default Language

2019-09-06 Thread Cezary Biernacki
You can always decorate PersistentLocale and change behaviour of get() by returning null from it, when the original result is your default locale. Cezary On Fri, Sep 6, 2019 at 10:45 AM Rafael Bugajewski wrote: > Hello, > > Tapestry supports putting the current locale into the URL path. I’m >

Localization & URLs for Default Language

2019-09-06 Thread Rafael Bugajewski
Hello, Tapestry supports putting the current locale into the URL path. I’m injecting PersistentLocale and switching between languages as advised in the documentation: if (persistentLocale.get() == null) { persistentLocale.set(new Locale("de")); } else if ("en".equalsIgnoreCase(persistentLoc