Q: How do I implement a language selection?
A:
src/main/java/org/example/myapp/pages
public class SelectLanguage {
@Inject
private PersistentLocale persistentLocale;
public void onChangeLocale(final String language) {
persistentLocale.set(new Locale(language));
}
}
Hello,
I've started a page on the Tapestry wiki which present a component that
offer to the visitor to change the site Locale by clicking on a flag.
http://wiki.apache.org/tapestry/ChangeLocale
There is no explanations, I'll add some next hours and days ...
Comments and changes are welcome !
age, but I'll give it a try and see
> how it works. Thanks for the response.
>
> Doug
>
> > -Original Message-
> > From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 14, 2007 7:22 PM
> > To: Tapestry users
> > Subject: Re: T
> From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 14, 2007 7:22 PM
> To: Tapestry users
> Subject: Re: T5: Changing locale within OnActivate event
>
> If it's anything like T4 you'll have to either do a redirect back to
> the same page or whatever me
If it's anything like T4 you'll have to either do a redirect back to
the same page or whatever mechanism is in place to "make a page
active" somehow and have it do that to the same page.
All the i18n stuff probably happens in the very beginning while
setting up the page/components/resources so it
In several of our pages, the default locale we want to use for messages
depends on its activation context. We tried updating the locale using
'ThreadLocale' from within the activate event handler, but it seems that
this is too late, for the page has already been loaded and all messages
in the templ
additional commands, e-mail: [EMAIL PROTECTED]
>>> > >
>>> > >
>>> >
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-
cookie on the client to provide the default for the locale on the next
visit, and store a locale name in the session (if a session exists). TODO: I
believe this has been implemented by Kent.
Petros
--
View this message in context:
http://www.nabble.com/Changing-Locale-tf3801846.html#a10757009
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work. http://howardlewisship.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/T5---Changing-Locale-tf3376399.html#a10424282
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work. http://howardlewisship.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/T5---Changing-Locale-tf3376399.html#a10414090
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ale.
>
> Thank you,
>
> Bogdan Calmac.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/T5---Changin
additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/T5---Changing-Locale-tf3376399.html#a9579521
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
I think that comment is out of date.
You should be able to inject the ThreadLocale service and change the
locale there. Tapestry will pick up on that and write out an updated
cookie, which will cause the subsequent render request to be in the
new locale.
On 3/9/07, Bogdan Calmac <[EMAIL PROTECT
Thanks guys, I saw that, but there was no mention about the ability to
change the locale at application level. So I can assume that for my
use case I would inject a new service in my page and use it to change
the locale programatically?
Thanks,
Bogdan Calmac.
On 3/9/07, Hugo Palma <[EMAIL PROTE
hey, did you copy my reply or did i copy yours ? :o)
Pablo Ruggia wrote:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/localization.html
"Tapestry does not yet support changing the locale, but that will be
available shortly. The intent is to mimic Tapestry 4 behavior: store a
cooki
http://tapestry.apache.org/tapestry5/tapestry-core/guide/localization.html
"Tapestry does not yet support changing the locale, but that will be
available shortly. The intent is to mimic Tapestry 4 behavior: store a
cookie on the client to provide the default for the locale on the next
visit, and
Is it possible in Tapestry 5 to programatically change the locale for
a sesison similar to IEngine.setLocale() from Tapestry 4?
In my case I want to set the locale after the login into the
application (locale is stored in the user profile) and not rely on the
browser locale.
Thank you,
Bogdan C
Take a look at the bottom of this page
http://tapestry.apache.org/tapestry5/tapestry-core/guide/localization.html.
/"Tapestry does not yet support changing the locale, but that will be
available shortly."/
Bogdan Calmac wrote:
Is it possible in Tapestry 5 to programatically change the locale
18 matches
Mail list logo