override this service:
http://jakarta.apache.org/tapestry/tapestry/hivedocs/service/tapestry.request.RequestLocaleManager.html
Cheers,
Ron
Greg Cormier wrote:
Yes, I have that in my code.
Hmm, I've just stumbled upon something. Apparently Tapestry uses non-session
cookies to store the Locale so the next time it will start in the same locale?
It would appear things MIGHT be working, it just happes that the last time I
quit I was in French.
Is there any ways to disable this persistent cookie?
Thanks,
Greg
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Ron Piterman
Sent: Thursday, February 09, 2006 10:38 AM
To: [email protected]
Subject: Re: Default Locale
http://wiki.apache.org/jakarta-tapestry/DefaultLocale
Greg Cormier wrote:
I just tried putting the french first, the same thing happens.
I'm really confused, if I can't get this working, this could be catastrophic
and I might have to drop Tapestry completely :(
I don't understand how my multiple setLocale() calls are ignored.
In my Engine class I have
public BorderEngine()
{
Logger.getLogger(BorderEngine.class).debug("setting locale to
english in constructor");
setLocale(Locale.ENGLISH);
}
In my Page class I had a default constructor to set the locale to english, but
you're not allowed to do that it throws an exception since you can't set the
locale on an existing page.
In my Border component, I have
public boolean getEnglish()
{
Logger.getLogger(Border.class).debug("I'm trying getEnglish for
" + getPage().getEngine().getLocale());
//if (getPage().getEngine().getLocale() == Locale.FRENCH)
// return false;
return true;
}
And this ALWAYS logs "I'm trying getEnglish for fr".
Greg
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Raul Raja Martinez
Sent: Wednesday, February 08, 2006 12:04 AM
To: [email protected]
Subject: Re: Default Locale
Do you get the same behaviour having french first and english second?
How about in other machines?
You're right the documentation says "When no match can be found, the
first locale in the list is treated as the default".
Raul.
Greg Cormier wrote:
Hi Raul Raja,
I've got :
<meta key="org.apache.tapestry.accepted-locales" value="en,fr" />
Which I believe is supposed to make Tapestry accept only english or french, and
default to english if the locale is null or something other then those. This is
why I'm confused since it should be defaulting to EN since it's the first
parameter.
Greg
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Raul Raja Martinez
Sent: Monday, February 06, 2006 11:58 PM
To: [email protected]
Subject: Re: Default Locale
Hi Greg,
Make sure your .application file is not forcing Tapestry to serve only
in french. For example:
<meta key="org.apache.tapestry.accepted-locales" value="es_ES" />
will force the Spanish for Spain locale.
best regards.
Raul Raja,
Andreas Bulling wrote:
Because you can set a default language which is sent on every request
the browser makes. It's just an idea you can check to make sure it's
not the browser.
Sincerly,
Andreas
On 06. Feb 2006 - 12:55:42, Greg Cormier wrote:
| I'm not sure why my browser would request the page in french since it's just
Firefox and I have all locales on my system refering to English. Plus, why
isn't the locale being set anyways on the Engine?
|
| Thanks,
| Greg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]