Hi Kristian, Thanks for the reply, it's kind of difficult for a Tapestry newbie to understand that code, will try to research some more on the topic of alias first and come back later. A.C.
kristian.marinkovic wrote: > > you could create your own ThreadLocale object that has > the request object injected and contribute it to the alias > service. > > i haven't tried it myself but it should look something like that: > > public static void bind(ServiceBinder binder) > { > binder.bind(ThreadLocale.class, DomainThreadLocale.class).scope( > IOCConstants.PERTHREAD_SCOPE).withId("domainThreadLocale"); > ...} > // create alias > public static void contributeAliasOverrides( > @InjectService("domainThreadLocale") ThreadLocale > threadLocale, > Configuration<AliasContribution<?>> configuration) { > > configuration.add( > AliasContribution.create( > ThreadLocale.class, threadLocale)); > } > > > DomainThreadLocale implements ThreadLocale { > public DomainThreadLocale (Request request) { > // check domain and set locale.... > } > } > > > > > > "Jérôme BERNARD" <[EMAIL PROTECTED]> > 04.10.2007 10:30 > Bitte antworten an > "Tapestry users" <users@tapestry.apache.org> > > > An > "Tapestry users" <users@tapestry.apache.org> > Kopie > > Thema > Re: T5: Domain level localization > > > > > > > Maybe a servlet filter? > > > Jérôme. > > On 10/4/07, Angelo Chen <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I'm not so sure if this Tapestry related, my T5 app can switch locales >> between English and Chinese using >> persistentLocaleService.set(Locale.SIMPLIFIED_CHINESE); >> >> Now I like the localization also in the domain level, let's say, I have > two >> domains, namely mydomain.com and mydomain.com.cn, if user goes to >> mydomain.com it show the English locale, if he goes to mydomain.com.cn > it >> will choose Chinese locale, it looks different sites but actually all > goes >> to the same IP, possible? any tips on this, thanks. >> A.C. >> -- >> View this message in context: > http://www.nabble.com/T5%3A-Domain-level-localization-tf4565942.html#a13032958 > >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > Jérôme BERNARD, > Kalixia, SARL. > http://weblog.kalixia.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- View this message in context: http://www.nabble.com/T5%3A-Domain-level-localization-tf4565942.html#a13039727 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]