Okay, I've read up in the Tapestry book about switching locales. They don't
quite do it the way I want to.
Basically, at the top of my page, if you're browsing in engilsh, you'll have a
"French" link. If you're browsing in French, there will be an "English" link
instead.
Right now, I have an @DirectLink, with "listeners:toggleLocale". This is what's
inside :
public void toggleLocale(IRequestCycle cycle)
{
((BorderEngine) getPage().getEngine()).toggleLocale();
cycle.activate("Welcome");
}
My Engine, which I've over-rode, is
public void toggleLocale()
{
if (getLocale() == Locale.ENGLISH)
setLocale(Locale.FRENCH);
else
setLocale(Locale.ENGLISH);
}
Now, this seems to be working. However, there's the famous problem mentioned
that you need to get a new page once you switch the Locale. So my question
is... how? This French/English link is available on every page, and should
return them to the page they came from.
Thanks,
Greg
-------------------- m2f --------------------
Sent from www.TapestryForums.com
Read this topic online here: <<topic_link>>
http://www.tapestryforums.com/viewtopic.php?p=14238#14238
-------------------- m2f --------------------